Color definition.
Members
-
inner EGA
-
EGA Color definition.
Properties:
Name Type Description BLACK
Color EGA color. BLUE
Color EGA color. GREEN
Color EGA color. CYAN
Color EGA color. RED
Color EGA color. MAGENTA
Color EGA color. BROWN
Color EGA color. LIGHT_GRAY
Color EGA color. LIGHT_GREY
Color EGA color. DARK_GRAY
Color EGA color. DARK_GREY
Color EGA color. LIGHT_BLUE
Color EGA color. LIGHT_GREEN
Color EGA color. LIGHT_CYAN
Color EGA color. LIGHT_RED
Color EGA color. LIGHT_MAGENTA
Color EGA color. YELLOW
Color EGA color. WHITE
Color EGA color. -
inner NO_COLOR
-
Properties:
Name Type Description NO_COLOR
Color the transparent Color.
Methods
-
inner Color(r, g, b, a) → {number}
-
create RGBA color.
Parameters:
Name Type Description r
number red (0-255) g
number green (0-255) b
number blue (0-255) a
number alpha (0-255) (optional) Returns:
number - a color. -
inner GetAlpha(c) → {number}
-
get alpha part of color.
Parameters:
Name Type Description c
number a color Returns:
number - the alpha part. -
inner GetBlue(c) → {number}
-
get blue part of color.
Parameters:
Name Type Description c
number a color Returns:
number - the blue part. -
inner GetGreen(c) → {number}
-
get green part of color.
Parameters:
Name Type Description c
number a color Returns:
number - the green part. -
inner GetRed(c) → {number}
-
get red part of color.
Parameters:
Name Type Description c
number a color Returns:
number - the red part. -
inner HSBColor(h, s, b, a)
-
Create Color() from HSB[A].
Parameters:
Name Type Description h
number the hue [0..255]. s
number the saturation [0..255]. b
number the brightness [0..255]. a
number the alpha value [0..255].