Module

color

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, aopt) → {number}

create RGBA color.

Parameters:
Name Type Attributes Description
r number

red (0-255)

g number

green (0-255)

b number

blue (0-255)

a number <optional>

alpha (0-255) (optional)

a color.

number

# inner GetAlpha(c) → {number}

get alpha part of color.

Parameters:
Name Type Description
c number

a color

the alpha part.

number

# inner GetBlue(c) → {number}

get blue part of color.

Parameters:
Name Type Description
c number

a color

the blue part.

number

# inner GetGreen(c) → {number}

get green part of color.

Parameters:
Name Type Description
c number

a color

the green part.

number

# inner GetRed(c) → {number}

get red part of color.

Parameters:
Name Type Description
c number

a color

the red part.

number

# 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].

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, aopt) → {number}

create RGBA color.

Parameters:
Name Type Attributes Description
r number

red (0-255)

g number

green (0-255)

b number

blue (0-255)

a number <optional>

alpha (0-255) (optional)

a color.

number

# inner GetAlpha(c) → {number}

get alpha part of color.

Parameters:
Name Type Description
c number

a color

the alpha part.

number

# inner GetBlue(c) → {number}

get blue part of color.

Parameters:
Name Type Description
c number

a color

the blue part.

number

# inner GetGreen(c) → {number}

get green part of color.

Parameters:
Name Type Description
c number

a color

the green part.

number

# inner GetRed(c) → {number}

get red part of color.

Parameters:
Name Type Description
c number

a color

the red part.

number

# 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].