Converting Color Values
Converting Color Values
Function Name
Input
Returns
Description
convertNameToHex()
Web Color Name
Converts web color name to hex value (string). 147 color names (16 standard colors plus 131, plus 7 for the gray and grey combinations).
convertHexToRGB()
Hex
Converts hex value to RGB values (object). Matches (shorthand version 3, or long version 6) values with or without #
convertCMYKToRGB()
C
M
Y
K
Converts CMYK values to RGB values (object).
Note CMYK conversion do not match photoshop's values. The conversion from RGB to CMYK is dependent on the physical device/process being used to lay down the inks. These are represented in software as Color Profiles.
convertHSVToRGB()
H
S
V
Converts HSV values to RGB values (object).
convertRGBToCMYK()
R
G
B
Converts RGB values to CMYK values (object).
Note CMYK conversion do not match photoshop's values. The conversion from RGB to CMYK is dependent on the physical device/process being used to lay down the inks. These are represented in software as Color Profiles.
convertRGBToHSV()
R
G
B
Converts RGB values to HSV values (object).
convertRGBToHex()
R
G
B
Converts RGB values to hex value (string).
convertRGBToWebsafe()
R
G
B
Converts RGB values to websafe RGB values (object).
Colors
listStandardColors()
None
List of 16 standard colors, plus 1 for the gray and grey combinations (array).
Rate and/or tell us what you think of this demo.
Rate
Excellent
Good
OK
Bad
Terrible
Report a bug
Comments (Optional)