| Package | com.yahoo.astra.utils |
| Class | public class ColorUtil |
See also
| Method | Defined by | ||
|---|---|---|---|
|
[static]
Converts an CMYK color value to the CMY colorspace.
| ColorUtil | ||
|
[static]
Converts an CMYK color value to the HSB colorspace.
| ColorUtil | ||
|
[static]
Converts an CMYK color value to the RGB colorspace.
| ColorUtil | ||
|
CMYKTouint(cmyk:CMYKColor):uint
[static]
Converts an CMYK color value to a standard uint color value.
| ColorUtil | ||
|
[static]
Converts an CMY color value to the CMYK colorspace.
| ColorUtil | ||
|
[static]
Converts an CMY color value to the HSB colorspace.
| ColorUtil | ||
|
[static]
Converts an CMY color value to the RGB colorspace.
| ColorUtil | ||
|
[static]
Converts an CMY color value to a standard uint color value.
| ColorUtil | ||
|
[static]
Converts an HSB color value to the CMYcolorspace.
| ColorUtil | ||
|
[static]
Converts an HSB color value to the CMYK colorspace.
| ColorUtil | ||
|
[static]
Converts an HSB color value to the RGB colorspace.
| ColorUtil | ||
|
[static]
Converts an HSB color value to a standard uint color value.
| ColorUtil | ||
|
[static]
Converts an RGB color value to the CMY colorspace.
| ColorUtil | ||
|
[static]
Converts an RGB color value to the CMYK colorspace.
| ColorUtil | ||
|
[static]
Converts an RGB color value to the HSB colorspace.
| ColorUtil | ||
|
[static]
Converts an RGB color value to a standard uint color value.
| ColorUtil | ||
|
toHexString(value:uint):String
[static]
Converts a uint color value to a hex string.
| ColorUtil | ||
|
[static]
Converts an uint color value to the CMY colorspace.
| ColorUtil | ||
|
uintToCMYK(color:uint):CMYKColor
[static]
Converts a uint color value to the CMYK colorspace.
| ColorUtil | ||
|
[static]
Converts a uint color value to the HSB colorspace.
| ColorUtil | ||
|
[static]
Converts a uint color value to the RGB colorspace.
| ColorUtil | ||
|
whiteOrBlack(value:uint):uint
[static]
Determines if white (0xfffff) or black (0x000000) is a better color
to display over the specified color value.
| ColorUtil | ||
| CMYKToCMY | () | method |
public static function CMYKToCMY(cmyk:CMYKColor):CMYColorConverts an CMYK color value to the CMY colorspace.
(Note: In practice, color values in the CMYK colorspace must be calculated based on environmental information. This algorithm provides, at best, nothing more than an approximation.)
Parameterscmyk:CMYKColor — the input CMYK value
|
CMYColor —
the value converted to CMY
|
| CMYKToHSB | () | method |
public static function CMYKToHSB(cmyk:CMYKColor):HSBColorConverts an CMYK color value to the HSB colorspace.
(Note: In practice, color values in the CMYK colorspace must be calculated based on environmental information. This algorithm provides, at best, nothing more than an approximation.)
Parameterscmyk:CMYKColor — the input CMYK value
|
HSBColor —
the value converted to HSB
|
| CMYKToRGB | () | method |
public static function CMYKToRGB(cmyk:CMYKColor):RGBColorConverts an CMYK color value to the RGB colorspace.
(Note: In practice, color values in the CMYK colorspace must be calculated based on environmental information. This algorithm provides, at best, nothing more than an approximation.)
Parameterscmyk:CMYKColor — the input CMYK value
|
RGBColor —
the value converted to RGB
|
| CMYKTouint | () | method |
public static function CMYKTouint(cmyk:CMYKColor):uintConverts an CMYK color value to a standard uint color value.
(Note: In practice, color values in the CMYK colorspace must be calculated based on environmental information. This algorithm provides, at best, nothing more than an approximation.)
Parameterscmyk:CMYKColor — the input CMYK value
|
uint — the value converted to uint
|
| CMYToCMYK | () | method |
public static function CMYToCMYK(cmy:CMYColor):CMYKColorConverts an CMY color value to the CMYK colorspace.
(Note: In practice, color values in the CMYK colorspace must be calculated based on environmental information. This algorithm provides, at best, nothing more than an approximation.)
Parameterscmy:CMYColor — the input CMY value
|
CMYKColor —
the value converted to CMYK
|
| CMYToHSB | () | method |
public static function CMYToHSB(cmy:CMYColor):HSBColorConverts an CMY color value to the HSB colorspace.
Parameterscmy:CMYColor — the input CMY value
|
HSBColor —
the value converted to HSB
|
| CMYToRGB | () | method |
public static function CMYToRGB(cmy:CMYColor):RGBColorConverts an CMY color value to the RGB colorspace.
Parameterscmy:CMYColor — the input CMY value
|
RGBColor —
the value converted to RGB
|
| CMYTouint | () | method |
public static function CMYTouint(cmy:CMYColor):uintConverts an CMY color value to a standard uint color value.
Parameterscmy:CMYColor — the input CMY value
|
uint — the value converted to uint
|
| HSBToCMY | () | method |
public static function HSBToCMY(hsb:HSBColor):CMYColorConverts an HSB color value to the CMYcolorspace.
Parametershsb:HSBColor — the input HSB value
|
CMYColor —
the value converted to CMY
|
| HSBToCMYK | () | method |
public static function HSBToCMYK(hsb:HSBColor):CMYKColorConverts an HSB color value to the CMYK colorspace.
(Note: In practice, color values in the CMYK colorspace must be calculated based on environmental information. This algorithm provides, at best, nothing more than an approximation.)
Parametershsb:HSBColor — the input HSB value
|
CMYKColor —
the value converted to CMYK
|
| HSBToRGB | () | method |
public static function HSBToRGB(hsb:HSBColor):RGBColorConverts an HSB color value to the RGB colorspace.
Parametershsb:HSBColor — the input HSB value
|
RGBColor —
the value converted to RGB
|
| HSBTouint | () | method |
public static function HSBTouint(hsb:HSBColor):uintConverts an HSB color value to a standard uint color value.
Parametershsb:HSBColor — the input HSB value
|
uint — the value converted to uint
|
| RGBToCMY | () | method |
public static function RGBToCMY(rgb:RGBColor):CMYColorConverts an RGB color value to the CMY colorspace.
Parametersrgb:RGBColor — the input RGB value
|
CMYColor —
the value converted to CMY
|
| RGBToCMYK | () | method |
public static function RGBToCMYK(rgb:RGBColor):CMYKColorConverts an RGB color value to the CMYK colorspace.
(Note: In practice, color values in the CMYK colorspace must be calculated based on environmental information. This algorithm provides, at best, nothing more than an approximation.)
Parametersrgb:RGBColor — the input RGB value
|
CMYKColor —
the value converted to CMYK
|
| RGBToHSB | () | method |
public static function RGBToHSB(rgb:RGBColor):HSBColorConverts an RGB color value to the HSB colorspace.
Parametersrgb:RGBColor — the input RGB value
|
HSBColor —
the value converted to HSB
|
| RGBTouint | () | method |
public static function RGBTouint(rgb:RGBColor):uintConverts an RGB color value to a standard uint color value.
Parametersrgb:RGBColor — the input RGB value
|
uint — the value converted to uint
|
| toHexString | () | method |
public static function toHexString(value:uint):StringConverts a uint color value to a hex string.
Format: XXXXXX, where X is a value between 0-F.
Parametersvalue:uint — the uint to convert
|
String — the converted value as a hex string
|
| uintToCMY | () | method |
public static function uintToCMY(color:uint):CMYColorConverts an uint color value to the CMY colorspace.
Parameterscolor:uint — the input uint color value
|
CMYColor —
the value converted to CMY
|
| uintToCMYK | () | method |
public static function uintToCMYK(color:uint):CMYKColorConverts a uint color value to the CMYK colorspace.
(Note: In practice, color values in the CMYK colorspace must be calculated based on environmental information. This algorithm provides, at best, nothing more than an approximation.)
Parameterscolor:uint — the input uint color value
|
CMYKColor —
the value converted to CMYK
|
| uintToHSB | () | method |
public static function uintToHSB(color:uint):HSBColorConverts a uint color value to the HSB colorspace.
Parameterscolor:uint — the input uinnt color value
|
HSBColor —
the value converted to HSB
|
| uintToRGB | () | method |
public static function uintToRGB(color:uint):RGBColorConverts a uint color value to the RGB colorspace.
Parameterscolor:uint — the input uint color value
|
RGBColor —
the value converted to RGB
|
| whiteOrBlack | () | method |
public static function whiteOrBlack(value:uint):uintDetermines if white (0xfffff) or black (0x000000) is a better color to display over the specified color value. Use case: Text color over a background color.
Parametersvalue:uint — the input color value
|
uint — black or white (0x000000 or 0xffffff).
|