ColorTools
ToDisplayable
compute a nearby color that can be represented in RGB
Calling Sequence
Parameters
Description
Examples
Compatibility
ToDisplayable(color, mopt)
color
-
color in a format recognized by ColorTools
mopt
(optional) equation of the form mode = string, indicating the method used to compute the resulting color
Many colors in the device independent colors spaces, such as CIE Lab, cannot be exactly represented in RGB and displayed on a monitor. The ToDisplayable command computes a nearby color that can be represented in RGB and thus displayed.
A color object that is not exactly displayable will be displayed with asterisks around the color space when the color object is printed.
By default a nearby color is determined by moving along the line towards the 50% gray in the CIE XYZ color space until a displayable color is reached. This can be specified explicitly by specifying the option mode = "XYZ".
Specifying mode = "Lab" will instead move along the line towards the neutral gray point in the CIE Lab color space that has the same L-coordinate as color.
Specifying mode = "HSV" will preserve the hue and truncate the saturation and value coordinates of color in the HSV color space to the range 0..1.
Specifying mode = "RGB" will truncate each of the coordinates of color in the RGB color space to the range 0..1.
Specifying mode = "RGBscale" will represent color in the RGB color space, then add the same minimal positive constant to each coordinate that makes all entries non-negative, and finally, if necessary, divide each coordinate by the maximal coordinate, so that the coordinates are all in the range 0..1.
The ColorTools[ToDisplayable] command was introduced in Maple 18.
For more information on Maple 18 changes, see Updates in Maple 18.
See Also
ColorTools/ColorSpaces
ColorTools[Color]
Download Help Document