ColorTools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

ColorTools

  

Convert

  

efficiently convert between color spaces

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Convert(color, outspace)

Convert(color, inspace, outspace)

Parameters

color

-

color format recognized by ColorTools or an rtable of floats

outspace

-

string specifying a known color space or "RGB24"

inspace

-

(optional) string specifying a known color space or "RGB24". Defaults to "RGB" or, if color is an object, its color space.

Description

• 

The primary purpose of the Convert command is to efficiently convert colors represented as lists of floating-point numbers from one color space to another.  However, the color argument can be any supported color format. If only one color space is specified, then the input space is assumed to be "RGB" unless the input color is a Color object.  In addition to all the color spaces supported for Color objects, the Convert command also allows "RGB24" to be used as the inspace or outspace.

• 

If color is an rtable it will be interpreted as an n x 3 array of color coordinates in the input space and an n x 3 array of coordinates in the output space will be returned.

Examples

withColorTools:

Convert1,0,0,HSV

0.,1.000000000,1.00000000

(1)

Convert1,0,0,RGB,HSV

0.,1.000000000,1.00000000

(2)

Convert0.25,1,1,HSV,RGB24

128,255,0

(3)

If inspace is not given, the input is assumed to be RGB.

Convert0.25,1,1,RGB24

64,255,255

(4)

Color object inputs implicitly specify inspace.

ConvertColorHSV,0.25,1,1,RGB24

128,255,0

(5)

Compatibility

• 

The ColorTools[Convert] command was introduced in Maple 18.

• 

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

See Also

ColorTools

ColorTools/ColorSpaces

ColorTools[Color]

 


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