|
ColorTools
|
|
Description
|
|
|
•
|
The ColorTools package contains functions for working with and converting colors, and doing conversions for: color names, internationalized color strings, hex color codes, decimal RGB sequences, and float sequences.
|
|
•
|
The core color type is the decimal RGB sequence, and can be used as a central point for conversion from one type to another.
|
|
•
|
The following is a list of the color formats handled by ColorTools
|
|
–
|
RGB24 - 24 bit RGB, integer values 0-255: [r,g,b]
|
|
–
|
RGB - Float RGB values 0.0-1.0: [rf,gf,bf]
|
|
–
|
Hex - Hex code in string form, e.g. either "#rrggbb" or "rrggbb"
|
|
–
|
Name - Named colors, old: 'black','BLACK' or new: "Black"
|
|
–
|
String - International strings - string form of Name but translated with GetMessage
|
|
–
|
PlotColor - COLOR primitive for plots: COLOR(RGB,x,y,z)
|
|
–
|
Color - A data structure encoding other color spaces. It is detailed in ColorTools[Color].
|
|
•
|
Hex/Name/String convert to/from RGB24 values, so to convert from xxx to yyy usually one must convert xxx to RGB24 then RGB24 to yyy.
|
|
•
|
The Color datastructure generally uses floating point RGB for intermediate calculations to avoid loss of precision from the 8 bits per channel restriction of RGB24.
|
|
|
|
Compatibility
|
|
|
•
|
The ColorTools package was introduced in Maple 16.
|
|
|
Download Help Document
Was this information helpful?