ColorTools/NearestNamedColor - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

ColorTools/NearestNamedColor

find the closest color with a name

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

NearestNamedColor(color)

Parameters

color

-

color format recognized by ColorTools

Options

• 

metric=string or name : the type of color distance to use

• 

new = truefalse : option passed to GetColorNames if palette is not specified

• 

number =  posint : the maximum number of nearby colors to return

• 

palette : a palette or palette name, a list of palettes and/or palette names, or "all"

• 

threshold = float : a maximum distance.  If number is not specified all results closer than this value will be returned.

Description

• 

The NearestNamedColor command locates one or more of the nearest named colors to the input color.

• 

It returns one or more named colors, along with the distances from the input color. When there is only one result, that single nearest color name is output, along with the distance in the specified metric (cie94 by default).

• 

When the number of outputs is greater than one, then the output is a list of the nearest colors and distances, closest first.

Examples

withColorTools:

NearestNamedColor255,16,0

Red,0.005383533871

(1)

NearestNamedColor255,16,0,metric=RGB

Red,0.03622589921

(2)

NearestNamedColor#f10,new=false

red,0.005821707864

(3)

NearestNamedColor#f10,number=3,palette=css,GetPaletteniagara

CSS Red,0.005821707864,CSS Maroon,0.3049415220,CSS Orange,0.3206349323

(4)

NearestNamedColor#cab,number=3,palette=all

Resene Lily,0.02195250833,Generic LightGrayishPurpleRed,0.03933517740,Generic LightGrayishRedPurple,0.04052141343

(5)

Compatibility

• 

The ColorTools/NearestNamedColor command was introduced in Maple 16.

• 

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

See Also

ColorTools

ColorTools/Color

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