ColorDescription - Maple Help

ColorTools

 ColorDescription
 compute a descriptive name for a color

 Calling Sequence ColorDescription(color) ColorDescription(color, medium) ColorDescription(color, short)

Parameters

 color - color format recognized by ColorTools

Description

 • The ColorDescription command returns a string with a description of the input color.
 • The description is based on the HSV representation of the color and is usually three parts: a lightness description, a saturation description, and a hue description, in that order.
 – The lightness description is one of "Blackish", "Very Dark", "Dark", "Medium", "Light", "Very Light", or "Whitish".
 – The saturation description is one of: "Pale", "Faded", "Strong", or "Vivid"
 – The hue description will be either Gray, or one of:
 • A pure hue: Red, Yellow, Orange, Green, Blue, or Purple.
 • An adjacent pair of the above hues combined with a space; this indicates that the color is near the midpoint of the two hues but is slightly closer to the second color.
 • An adjacent pair of the above hues with the first modified with the suffix "ish". This indicated that the color is nearer the second hue but shaded slightly in the direction of the first.
 • If the short or medium options are given:
 – The lightness description is "Light", "Dark", or none.
 – The saturation description is "Pale" or none.
 – Additionally, if short is given the "ish" hue descriptions are "rounded" up or down to pure hues or combined hues.
 • The description returned can be used as an input for the Color constructor by adding the palette specifier "Generic" to the beginning. This will not result in a perfect round trip for the vast majority of colors.

Examples

 > $\mathrm{with}\left(\mathrm{ColorTools}\right):$
 > $\mathrm{ColorDescription}\left("DarkOrchid"\right)$
 ${"Medium Faded Bluish Purple"}$ (1)
 > $\mathrm{Color}\left("RGB","Generic Medium Faded Bluish Purple"\right)$
 ${⟨}\colorbox[rgb]{0.682352941176471,0.211764705882353,0.83921568627451}{RGB : 0.682 0.212 0.839}{⟩}$ (2)
 > $\mathrm{ColorDescription}\left("DarkOrchid",'\mathrm{short}'\right)$
 ${"Blue Purple"}$ (3)
 > $\mathrm{Color}\left("RGB","Generic Blue Purple"\right)$
 ${⟨}\colorbox[rgb]{0.580392156862745,0.0823529411764706,0.968627450980392}{{RGB : 0.58 0.0824 0.969}}{⟩}$ (4)
 > $\mathrm{ColorDescription}\left(\mathrm{Color}\left(\left[10,10,10\right]\right)\right)$
 ${"Black"}$ (5)

Compatibility

 • The ColorTools[ColorDescription] command was introduced in Maple 16.