ColorTools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Graphics : Packages : ColorTools : ColorTools/Color

ColorTools

  

Color

  

construct a color data structure

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Color(colorspace, coordinates)

Color(colorspace, color)

Color(color)

Parameters

colorspace

-

string designating a known color space; "RGB" by default

coordinates

-

coordinates of the color in the given color space

color

-

color format recognized by ColorTools

Description

• 

The Color procedure is a constructor for a color data structure.  This data structure is recognized by most ColorTools commands and many plot commands.

• 

The parameter colorspace can be any of the color spaces listed on the ColorTools/ColorSpaces help page.

• 

Color structures can be indexed as lists.  Two structures are considered equal only if their distance (in the CIE76 metric) is less than 1012Digits.

Examples

withColorTools:

Colors can be constructed with names

ColorNiagara 1

RGB : 0.471 0 0.0549

(1)

ColorHSV,Niagara 1

HSV : 0.981 1 0.471

(2)

or with coordinates in the specified space

Color0.5,0.6,0.6

RGB : 0.5 0.6 0.6

(3)

ColorHSV,0.5,0.6,0.6

HSV : 0.5 0.6 0.6

(4)

ColorXYZ,0.5,0.6,0.6

XYZ : 0.5 0.6 0.6

(5)

They can be indexed as lists using either numeric or character indices

GColorGreen

G:=RGB : 0 0.502 0

(6)

G2

0.50196078

(7)

GG

0.50196078

(8)

G[]

0.,0.50196078,0.

(9)

G2ColorLab,G

G2:=Lab : 46.2 -51.7 49.9

(10)

G2a

51.6984952

(11)

Two colors can be the same even if they are specified in difference color spaces

evalbG=G2

true

(12)

DistanceG,G2,metric='cie76'

3.00188890510-7

(13)

evalbG=DarkenG

false

(14)

DistanceG,DarkenG2,metric='cie76'

0.1397324229

(15)

Compatibility

• 

The ColorTools[Color] command was introduced in Maple 16.

• 

For more information on Maple 16 changes, see Updates in Maple 16.

See Also

ColorTools

ColorTools/ColorSpaces

ColorTools[Distance]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam