The Color class provides precomputed palettes and common color names for widgets so they can be presented as a coherent color theme.
The size of the Color class is kept small enough to be used in a preloader. This class is therefore not integrated with the ColorNameTable class because the combined size would be prohibitive for a preloader.
| Color | The Color class provides precomputed palettes and common color names for widgets so they can be presented as a coherent color theme. |
| Common color names | |
| Common color palettes | |
| paletteLight | NOTE: Assumption |
| paletteMedium | Medium color palette |
| paletteBright | Bright color palette aka Rainbow |
| paletteShadow | Shadow color palette |
| Color palette iterators | |
| index | Current index into the color palettes |
| next | Get the next medium color in the palette sequence |
| random | Get a medium color chosen by random from the palette sequence |
| Color conversion | |
| light | Convert a color value to its light palette variation. |
| medium | Convert a color value to its medium palette variation. |
| bright | Convert a color value to its bright palette variation. |
| shadow | Convert a color value to its shadow palette variation. |
| Palette query methods | |
| isLight | Returns true if the color value is in the light palette |
| isMedium | Returns true if the color value is in the medium palette |
| isBright | Returns true if the color value is in the bright palette |
| isShadow | Returns true if the color value is in the shadow palette |
| isInPalette | Returns true if the color value is in any palette |
NOTE: Assumption
private static var paletteLight: Array
Medium color palette
private static var paletteMedium: Array
Bright color palette aka Rainbow
private static var paletteBright: Array
Shadow color palette
private static var paletteShadow: Array
Current index into the color palettes
private static var index: uint
Get the next medium color in the palette sequence
public static function get next():uint
Get a medium color chosen by random from the palette sequence
public static function get random():uint
Convert a color value to its light palette variation.
public static function light( color: uint ):uint
Convert a color value to its medium palette variation.
public static function medium( color: uint ):uint
Convert a color value to its bright palette variation.
public static function bright( color: uint ):uint
Convert a color value to its shadow palette variation.
public static function shadow( color: uint ):uint
Returns true if the color value is in the light palette
public static function isLight( color: uint ):Boolean
Returns true if the color value is in the medium palette
public static function isMedium( color: uint ):Boolean
Returns true if the color value is in the bright palette
public static function isBright( color: uint ):Boolean
Returns true if the color value is in the shadow palette
public static function isShadow( color: uint ):Boolean
Returns true if the color value is in any palette
public static function isInPalette( color: uint ):Boolean