NamedPalette
ReferencesRepresents a collection of uniquely named colours. Think of this as a colour dictionary.
Constructors
Fields
Properties
EmptyPalette
#Create an 'empty' palette containing only Black and White.
Returns: Palette with the only colours *everyone* can agree on.
StandardCorePalette
#Create the standard Grasshopper colour palette containing only the principal colours.
StandardFullPalette
#Create the standard Grasshopper colour palette, including all secondary colours.
X11Palette
#Create a palette containing the standard web palette.
Returns: Colour palette based on the X11 palette.
Methods
AddToRhinoDocument
#Insert this palette into a Rhino document as a set of dots.
Returns: Array of guids of added objects.
CanReplace
#Resolve whether a specific name can be replaced with another without name collisions. If the oldName hasn't been defined yet, replacement is considered to be possible.
Returns: True if replacement is possible.
Compose
#Compose a colour based on some textual description.
Returns: Level of confidence in the result.
ContainsName
#Gets whether a specific name has already been defined.
Describe
#Describe a colour as the most similar named colour.
Returns: Name of most similar colour, with a tilde prefix if the named colour differs significantly.
Find
#Find the colour closest to the given one.
public NamedColour Find()
Color
colour,
Colour locus.
out double
deviation
Deviation between source and target colour measured in the CIE delta-E metric.
Returns: Colour closest to the given one.
Find
#Find the colour associated with the specified name.
Returns: Colour associated with name or null.
FindIdentical
#Find all identical colours.
Returns: All identical colours, sorted from most similar to least similar.
FindSimilar
#Find all similar colours (but not any identical colours).
public NamedColour[] FindSimilar()
Color
colour,
Base colour.
maxDeviation,
Threshold for similarity. This distance is measured within a vertically aligned sinusoidal volume with black at (0,0-1) and white at (0,0,+1). Hue is mapped around the central axis and saturation and luminance together control the offset from the central axis, which is at most 0.5 around the equator. The largest possible distance between any two colours is 2.0, between black and white.
maxCount
Maximum number of results to return.
Returns: All similar colours, sorted from most similar to least similar.
ImpliedPalette
#Gets the palette implied by the name. If no matching palette can be found, null will be returned.
Merge
#Merge a collection of palettes.
public static NamedPalette Merge()
mergeFunction,
Merge function used in case of name collisions.
palettes
Dictionaries to merge.
Returns: Merged palette.
Merge
#Merge a collection of palettes.
public static NamedPalette Merge()
behaviour,
One of the preset merge behaviours.
palettes
Dictionaries to merge. Colliding names are omitted from later palettes.
Returns: Merged palette.
ToString
#Returns a string that represents the current object.
Returns: A string that represents the current object.
Overrides: Object.ToString