Skip to content

Color

Functions

Alpha Of

Returns the alpha of the supplied color.

Parameters:

NameTypeDescription
cColorThe color

Return Type: Integer

Signatures:

int alpha_of(color c)

Blue Of

Returns the blue of the supplied color.

Parameters:

NameTypeDescription
cColorThe color

Return Type: Integer

Signatures:

int blue_of(color c)

Brightness Of

Returns the brightness of the supplied color.

Parameters:

NameTypeDescription
cColorThe color

Return Type: Double

Signatures:

double brightness_of(color c)

Color Alice Blue

Color Alice Blue

Generates a new Color associated to the color alice_blue.

Return Type: Color

Signatures:

#define COLOR_ALICE_BLUE
color color_alice_blue()

Color Antique White

Color Antique White

Generates a new Color associated to the color antique_white.

Return Type: Color

Signatures:

#define COLOR_ANTIQUE_WHITE
color color_antique_white()

Color Aqua

Color Aqua

Generates a new Color associated to the color aqua.

Return Type: Color

Signatures:

#define COLOR_AQUA
color color_aqua()

Color Aquamarine

Color Aquamarine

Generates a new Color associated to the color aquamarine.

Return Type: Color

Signatures:

#define COLOR_AQUAMARINE
color color_aquamarine()

Color Azure

Color Azure

Generates a new Color associated to the color azure.

Return Type: Color

Signatures:

#define COLOR_AZURE
color color_azure()

Color Beige

Color Beige

Generates a new Color associated to the color beige.

Return Type: Color

Signatures:

#define COLOR_BEIGE
color color_beige()

Color Bisque

Color Bisque

Generates a new Color associated to the color bisque.

Return Type: Color

Signatures:

#define COLOR_BISQUE
color color_bisque()

Color Black

Color Black

Generates a new Color associated to the color black.

Return Type: Color

Signatures:

#define COLOR_BLACK
color color_black()

Color Blanched Almond

Color Blanched Almond

Generates a new Color associated to the color blanched_almond.

Return Type: Color

Signatures:

#define COLOR_BLANCHED_ALMOND
color color_blanched_almond()

Color Blue

Color Blue

Generates a new Color associated to the color blue.

Return Type: Color

Signatures:

#define COLOR_BLUE
color color_blue()

Color Blue Violet

Color Blue Violet

Generates a new Color associated to the color blue_violet.

Return Type: Color

Signatures:

#define COLOR_BLUE_VIOLET
color color_blue_violet()

Color Bright Green

Color Bright Green

Generates a new Color associated to the color bright_green.

Return Type: Color

Signatures:

#define COLOR_BRIGHT_GREEN
color color_bright_green()

Color Brown

Color Brown

Generates a new Color associated to the color brown.

Return Type: Color

Signatures:

#define COLOR_BROWN
color color_brown()

Color Burly Wood

Color Burly Wood

Generates a new Color associated to the color burly_wood.

Return Type: Color

Signatures:

#define COLOR_BURLY_WOOD
color color_burly_wood()

Color Cadet Blue

Color Cadet Blue

Generates a new Color associated to the color cadet_blue.

Return Type: Color

Signatures:

#define COLOR_CADET_BLUE
color color_cadet_blue()

Color Chartreuse

Color Chartreuse

Generates a new Color associated to the color chartreuse.

Return Type: Color

Signatures:

#define COLOR_CHARTREUSE
color color_chartreuse()

Color Chocolate

Color Chocolate

Generates a new Color associated to the color chocolate.

Return Type: Color

Signatures:

#define COLOR_CHOCOLATE
color color_chocolate()

Color Coral

Color Coral

Generates a new Color associated to the color coral.

Return Type: Color

Signatures:

#define COLOR_CORAL
color color_coral()

Color Cornflower Blue

Color Cornflower Blue

Generates a new Color associated to the color cornflower_blue.

Return Type: Color

Signatures:

#define COLOR_CORNFLOWER_BLUE
color color_cornflower_blue()

Color Cornsilk

Color Cornsilk

Generates a new Color associated to the color cornsilk.

Return Type: Color

Signatures:

#define COLOR_CORNSILK
color color_cornsilk()

Color Crimson

Color Crimson

Generates a new Color associated to the color crimson.

Return Type: Color

Signatures:

#define COLOR_CRIMSON
color color_crimson()

Color Cyan

Color Cyan

Generates a new Color associated to the color cyan.

Return Type: Color

Signatures:

#define COLOR_CYAN
color color_cyan()

Color Dark Blue

Color Dark Blue

Generates a new Color associated to the color dark_blue.

Return Type: Color

Signatures:

#define COLOR_DARK_BLUE
color color_dark_blue()

Color Dark Cyan

Color Dark Cyan

Generates a new Color associated to the color dark_cyan.

Return Type: Color

Signatures:

#define COLOR_DARK_CYAN
color color_dark_cyan()

Color Dark Goldenrod

Color Dark Goldenrod

Generates a new Color associated to the color dark_goldenrod.

Return Type: Color

Signatures:

#define COLOR_DARK_GOLDENROD
color color_dark_goldenrod()

Color Dark Gray

Color Dark Gray

Generates a new Color associated to the color dark_gray.

Return Type: Color

Signatures:

#define COLOR_DARK_GRAY
color color_dark_gray()

Color Dark Green

Color Dark Green

Generates a new Color associated to the color dark_green.

Return Type: Color

Signatures:

#define COLOR_DARK_GREEN
color color_dark_green()

Color Dark Khaki

Color Dark Khaki

Generates a new Color associated to the color dark_khaki.

Return Type: Color

Signatures:

#define COLOR_DARK_KHAKI
color color_dark_khaki()

Color Dark Magenta

Color Dark Magenta

Generates a new Color associated to the color dark_magenta.

Return Type: Color

Signatures:

#define COLOR_DARK_MAGENTA
color color_dark_magenta()

Color Dark Olive Green

Color Dark Olive Green

Generates a new Color associated to the color dark_olive_green.

Return Type: Color

Signatures:

#define COLOR_DARK_OLIVE_GREEN
color color_dark_olive_green()

Color Dark Orange

Color Dark Orange

Generates a new Color associated to the color dark_orange.

Return Type: Color

Signatures:

#define COLOR_DARK_ORANGE
color color_dark_orange()

Color Dark Orchid

Color Dark Orchid

Generates a new Color associated to the color dark_orchid.

Return Type: Color

Signatures:

#define COLOR_DARK_ORCHID
color color_dark_orchid()

Color Dark Red

Color Dark Red

Generates a new Color associated to the color dark_red.

Return Type: Color

Signatures:

#define COLOR_DARK_RED
color color_dark_red()

Color Dark Salmon

Color Dark Salmon

Generates a new Color associated to the color dark_salmon.

Return Type: Color

Signatures:

#define COLOR_DARK_SALMON
color color_dark_salmon()

Color Dark Sea Green

Color Dark Sea Green

Generates a new Color associated to the color dark_sea_green.

Return Type: Color

Signatures:

#define COLOR_DARK_SEA_GREEN
color color_dark_sea_green()

Color Dark Slate Blue

Color Dark Slate Blue

Generates a new Color associated to the color dark_slate_blue.

Return Type: Color

Signatures:

#define COLOR_DARK_SLATE_BLUE
color color_dark_slate_blue()

Color Dark Slate Gray

Color Dark Slate Gray

Generates a new Color associated to the color dark_slate_gray.

Return Type: Color

Signatures:

#define COLOR_DARK_SLATE_GRAY
color color_dark_slate_gray()

Color Dark Turquoise

Color Dark Turquoise

Generates a new Color associated to the color dark_turquoise.

Return Type: Color

Signatures:

#define COLOR_DARK_TURQUOISE
color color_dark_turquoise()

Color Dark Violet

Color Dark Violet

Generates a new Color associated to the color dark_violet.

Return Type: Color

Signatures:

#define COLOR_DARK_VIOLET
color color_dark_violet()

Color Deep Pink

Color Deep Pink

Generates a new Color associated to the color deep_pink.

Return Type: Color

Signatures:

#define COLOR_DEEP_PINK
color color_deep_pink()

Color Deep Sky Blue

Color Deep Sky Blue

Generates a new Color associated to the color deep_sky_blue.

Return Type: Color

Signatures:

#define COLOR_DEEP_SKY_BLUE
color color_deep_sky_blue()

Color Dim Gray

Color Dim Gray

Generates a new Color associated to the color dim_gray.

Return Type: Color

Signatures:

#define COLOR_DIM_GRAY
color color_dim_gray()

Color Dodger Blue

Color Dodger Blue

Generates a new Color associated to the color dodger_blue.

Return Type: Color

Signatures:

#define COLOR_DODGER_BLUE
color color_dodger_blue()

Color Firebrick

Color Firebrick

Generates a new Color associated to the color firebrick.

Return Type: Color

Signatures:

#define COLOR_FIREBRICK
color color_firebrick()

Color Floral White

Color Floral White

Generates a new Color associated to the color floral_white.

Return Type: Color

Signatures:

#define COLOR_FLORAL_WHITE
color color_floral_white()

Color Forest Green

Color Forest Green

Generates a new Color associated to the color forest_green.

Return Type: Color

Signatures:

#define COLOR_FOREST_GREEN
color color_forest_green()

Color Fuchsia

Color Fuchsia

Generates a new Color associated to the color fuchsia.

Return Type: Color

Signatures:

#define COLOR_FUCHSIA
color color_fuchsia()

Color Gainsboro

Color Gainsboro

Generates a new Color associated to the color gainsboro.

Return Type: Color

Signatures:

#define COLOR_GAINSBORO
color color_gainsboro()

Color Ghost White

Color Ghost White

Generates a new Color associated to the color ghost_white.

Return Type: Color

Signatures:

#define COLOR_GHOST_WHITE
color color_ghost_white()

Color Gold

Color Gold

Generates a new Color associated to the color gold.

Return Type: Color

Signatures:

#define COLOR_GOLD
color color_gold()

Color Goldenrod

Color Goldenrod

Generates a new Color associated to the color goldenrod.

Return Type: Color

Signatures:

#define COLOR_GOLDENROD
color color_goldenrod()

Color Gray

Color Gray

Generates a new Color associated to the color gray.

Return Type: Color

Signatures:

#define COLOR_GRAY
color color_gray()

Color Green

Color Green

Generates a new Color associated to the color green.

Return Type: Color

Signatures:

#define COLOR_GREEN
color color_green()

Color Green Yellow

Color Green Yellow

Generates a new Color associated to the color green_yellow.

Return Type: Color

Signatures:

#define COLOR_GREEN_YELLOW
color color_green_yellow()

Color Honeydew

Color Honeydew

Generates a new Color associated to the color honeydew.

Return Type: Color

Signatures:

#define COLOR_HONEYDEW
color color_honeydew()

Color Hot Pink

Color Hot Pink

Generates a new Color associated to the color hot_pink.

Return Type: Color

Signatures:

#define COLOR_HOT_PINK
color color_hot_pink()

Color Indian Red

Color Indian Red

Generates a new Color associated to the color indian_red.

Return Type: Color

Signatures:

#define COLOR_INDIAN_RED
color color_indian_red()

Color Indigo

Color Indigo

Generates a new Color associated to the color indigo.

Return Type: Color

Signatures:

#define COLOR_INDIGO
color color_indigo()

Color Ivory

Color Ivory

Generates a new Color associated to the color ivory.

Return Type: Color

Signatures:

#define COLOR_IVORY
color color_ivory()

Color Khaki

Color Khaki

Generates a new Color associated to the color khaki.

Return Type: Color

Signatures:

#define COLOR_KHAKI
color color_khaki()

Color Lavender

Color Lavender

Generates a new Color associated to the color lavender.

Return Type: Color

Signatures:

#define COLOR_LAVENDER
color color_lavender()

Color Lavender Blush

Color Lavender Blush

Generates a new Color associated to the color lavender_blush.

Return Type: Color

Signatures:

#define COLOR_LAVENDER_BLUSH
color color_lavender_blush()

Color Lawn Green

Color Lawn Green

Generates a new Color associated to the color lawn_green.

Return Type: Color

Signatures:

#define COLOR_LAWN_GREEN
color color_lawn_green()

Color Lemon Chiffon

Color Lemon Chiffon

Generates a new Color associated to the color lemon_chiffon.

Return Type: Color

Signatures:

#define COLOR_LEMON_CHIFFON
color color_lemon_chiffon()

Color Light Blue

Color Light Blue

Generates a new Color associated to the color light_blue.

Return Type: Color

Signatures:

#define COLOR_LIGHT_BLUE
color color_light_blue()

Color Light Coral

Color Light Coral

Generates a new Color associated to the color light_coral.

Return Type: Color

Signatures:

#define COLOR_LIGHT_CORAL
color color_light_coral()

Color Light Cyan

Color Light Cyan

Generates a new Color associated to the color light_cyan.

Return Type: Color

Signatures:

#define COLOR_LIGHT_CYAN
color color_light_cyan()

Color Light Goldenrod Yellow

Color Light Goldenrod Yellow

Generates a new Color associated to the color light_goldenrod_yellow.

Return Type: Color

Signatures:

#define COLOR_LIGHT_GOLDENROD_YELLOW
color color_light_goldenrod_yellow()

Color Light Gray

Color Light Gray

Generates a new Color associated to the color light_gray.

Return Type: Color

Signatures:

#define COLOR_LIGHT_GRAY
color color_light_gray()

Color Light Green

Color Light Green

Generates a new Color associated to the color light_green.

Return Type: Color

Signatures:

#define COLOR_LIGHT_GREEN
color color_light_green()

Color Light Pink

Color Light Pink

Generates a new Color associated to the color light_pink.

Return Type: Color

Signatures:

#define COLOR_LIGHT_PINK
color color_light_pink()

Color Light Salmon

Color Light Salmon

Generates a new Color associated to the color light_salmon.

Return Type: Color

Signatures:

#define COLOR_LIGHT_SALMON
color color_light_salmon()

Color Light Sea Green

Color Light Sea Green

Generates a new Color associated to the color light_sea_green.

Return Type: Color

Signatures:

#define COLOR_LIGHT_SEA_GREEN
color color_light_sea_green()

Color Light Sky Blue

Color Light Sky Blue

Generates a new Color associated to the color light_sky_blue.

Return Type: Color

Signatures:

#define COLOR_LIGHT_SKY_BLUE
color color_light_sky_blue()

Color Light Slate Gray

Color Light Slate Gray

Generates a new Color associated to the color light_slate_gray.

Return Type: Color

Signatures:

#define COLOR_LIGHT_SLATE_GRAY
color color_light_slate_gray()

Color Light Steel Blue

Color Light Steel Blue

Generates a new Color associated to the color light_steel_blue.

Return Type: Color

Signatures:

#define COLOR_LIGHT_STEEL_BLUE
color color_light_steel_blue()

Color Light Yellow

Color Light Yellow

Generates a new Color associated to the color light_yellow.

Return Type: Color

Signatures:

#define COLOR_LIGHT_YELLOW
color color_light_yellow()

Color Lime

Color Lime

Generates a new Color associated to the color lime.

Return Type: Color

Signatures:

#define COLOR_LIME
color color_lime()

Color Lime Green

Color Lime Green

Generates a new Color associated to the color lime_green.

Return Type: Color

Signatures:

#define COLOR_LIME_GREEN
color color_lime_green()

Color Linen

Color Linen

Generates a new Color associated to the color linen.

Return Type: Color

Signatures:

#define COLOR_LINEN
color color_linen()

Color Magenta

Color Magenta

Generates a new Color associated to the color magenta.

Return Type: Color

Signatures:

#define COLOR_MAGENTA
color color_magenta()

Color Maroon

Color Maroon

Generates a new Color associated to the color maroon.

Return Type: Color

Signatures:

#define COLOR_MAROON
color color_maroon()

Color Medium Aquamarine

Color Medium Aquamarine

Generates a new Color associated to the color medium_aquamarine.

Return Type: Color

Signatures:

#define COLOR_MEDIUM_AQUAMARINE
color color_medium_aquamarine()

Color Medium Blue

Color Medium Blue

Generates a new Color associated to the color medium_blue.

Return Type: Color

Signatures:

#define COLOR_MEDIUM_BLUE
color color_medium_blue()

Color Medium Orchid

Color Medium Orchid

Generates a new Color associated to the color medium_orchid.

Return Type: Color

Signatures:

#define COLOR_MEDIUM_ORCHID
color color_medium_orchid()

Color Medium Purple

Color Medium Purple

Generates a new Color associated to the color medium_purple.

Return Type: Color

Signatures:

#define COLOR_MEDIUM_PURPLE
color color_medium_purple()

Color Medium Sea Green

Color Medium Sea Green

Generates a new Color associated to the color medium_sea_green.

Return Type: Color

Signatures:

#define COLOR_MEDIUM_SEA_GREEN
color color_medium_sea_green()

Color Medium Slate Blue

Color Medium Slate Blue

Generates a new Color associated to the color medium_slate_blue.

Return Type: Color

Signatures:

#define COLOR_MEDIUM_SLATE_BLUE
color color_medium_slate_blue()

Color Medium Spring Green

Color Medium Spring Green

Generates a new Color associated to the color medium_spring_green.

Return Type: Color

Signatures:

#define COLOR_MEDIUM_SPRING_GREEN
color color_medium_spring_green()

Color Medium Turquoise

Color Medium Turquoise

Generates a new Color associated to the color medium_turquoise.

Return Type: Color

Signatures:

#define COLOR_MEDIUM_TURQUOISE
color color_medium_turquoise()

Color Medium Violet Red

Color Medium Violet Red

Generates a new Color associated to the color medium_violet_red.

Return Type: Color

Signatures:

#define COLOR_MEDIUM_VIOLET_RED
color color_medium_violet_red()

Color Midnight Blue

Color Midnight Blue

Generates a new Color associated to the color midnight_blue.

Return Type: Color

Signatures:

#define COLOR_MIDNIGHT_BLUE
color color_midnight_blue()

Color Mint Cream

Color Mint Cream

Generates a new Color associated to the color mint_cream.

Return Type: Color

Signatures:

#define COLOR_MINT_CREAM
color color_mint_cream()

Color Misty Rose

Color Misty Rose

Generates a new Color associated to the color misty_rose.

Return Type: Color

Signatures:

#define COLOR_MISTY_ROSE
color color_misty_rose()

Color Moccasin

Color Moccasin

Generates a new Color associated to the color moccasin.

Return Type: Color

Signatures:

#define COLOR_MOCCASIN
color color_moccasin()

Color Navajo White

Color Navajo White

Generates a new Color associated to the color navajo_white.

Return Type: Color

Signatures:

#define COLOR_NAVAJO_WHITE
color color_navajo_white()

Color Navy

Color Navy

Generates a new Color associated to the color navy.

Return Type: Color

Signatures:

#define COLOR_NAVY
color color_navy()

Color Old Lace

Color Old Lace

Generates a new Color associated to the color old_lace.

Return Type: Color

Signatures:

#define COLOR_OLD_LACE
color color_old_lace()

Color Olive

Color Olive

Generates a new Color associated to the color olive.

Return Type: Color

Signatures:

#define COLOR_OLIVE
color color_olive()

Color Olive Drab

Color Olive Drab

Generates a new Color associated to the color olive_drab.

Return Type: Color

Signatures:

#define COLOR_OLIVE_DRAB
color color_olive_drab()

Color Orange

Color Orange

Generates a new Color associated to the color orange.

Return Type: Color

Signatures:

#define COLOR_ORANGE
color color_orange()

Color Orange Red

Color Orange Red

Generates a new Color associated to the color orange_red.

Return Type: Color

Signatures:

#define COLOR_ORANGE_RED
color color_orange_red()

Color Orchid

Color Orchid

Generates a new Color associated to the color orchid.

Return Type: Color

Signatures:

#define COLOR_ORCHID
color color_orchid()

Color Pale Goldenrod

Color Pale Goldenrod

Generates a new Color associated to the color pale_goldenrod.

Return Type: Color

Signatures:

#define COLOR_PALE_GOLDENROD
color color_pale_goldenrod()

Color Pale Green

Color Pale Green

Generates a new Color associated to the color pale_green.

Return Type: Color

Signatures:

#define COLOR_PALE_GREEN
color color_pale_green()

Color Pale Turquoise

Color Pale Turquoise

Generates a new Color associated to the color pale_turquoise.

Return Type: Color

Signatures:

#define COLOR_PALE_TURQUOISE
color color_pale_turquoise()

Color Pale Violet Red

Color Pale Violet Red

Generates a new Color associated to the color pale_violet_red.

Return Type: Color

Signatures:

#define COLOR_PALE_VIOLET_RED
color color_pale_violet_red()

Color Papaya Whip

Color Papaya Whip

Generates a new Color associated to the color papaya_whip.

Return Type: Color

Signatures:

#define COLOR_PAPAYA_WHIP
color color_papaya_whip()

Color Peach Puff

Color Peach Puff

Generates a new Color associated to the color peach_puff.

Return Type: Color

Signatures:

#define COLOR_PEACH_PUFF
color color_peach_puff()

Color Peru

Color Peru

Generates a new Color associated to the color peru.

Return Type: Color

Signatures:

#define COLOR_PERU
color color_peru()

Color Pink

Color Pink

Generates a new Color associated to the color pink.

Return Type: Color

Signatures:

#define COLOR_PINK
color color_pink()

Color Plum

Color Plum

Generates a new Color associated to the color plum.

Return Type: Color

Signatures:

#define COLOR_PLUM
color color_plum()

Color Powder Blue

Color Powder Blue

Generates a new Color associated to the color powder_blue.

Return Type: Color

Signatures:

#define COLOR_POWDER_BLUE
color color_powder_blue()

Color Purple

Color Purple

Generates a new Color associated to the color purple.

Return Type: Color

Signatures:

#define COLOR_PURPLE
color color_purple()

Color Red

Color Red

Generates a new Color associated to the color red.

Return Type: Color

Signatures:

#define COLOR_RED
color color_red()

Color Rosy Brown

Color Rosy Brown

Generates a new Color associated to the color rosy_brown.

Return Type: Color

Signatures:

#define COLOR_ROSY_BROWN
color color_rosy_brown()

Color Royal Blue

Color Royal Blue

Generates a new Color associated to the color royal_blue.

Return Type: Color

Signatures:

#define COLOR_ROYAL_BLUE
color color_royal_blue()

Color Saddle Brown

Color Saddle Brown

Generates a new Color associated to the color saddle_brown.

Return Type: Color

Signatures:

#define COLOR_SADDLE_BROWN
color color_saddle_brown()

Color Salmon

Color Salmon

Generates a new Color associated to the color salmon.

Return Type: Color

Signatures:

#define COLOR_SALMON
color color_salmon()

Color Sandy Brown

Color Sandy Brown

Generates a new Color associated to the color sandy_brown.

Return Type: Color

Signatures:

#define COLOR_SANDY_BROWN
color color_sandy_brown()

Color Sea Green

Color Sea Green

Generates a new Color associated to the color sea_green.

Return Type: Color

Signatures:

#define COLOR_SEA_GREEN
color color_sea_green()

Color Sea Shell

Color Sea Shell

Generates a new Color associated to the color sea_shell.

Return Type: Color

Signatures:

#define COLOR_SEA_SHELL
color color_sea_shell()

Color Sienna

Color Sienna

Generates a new Color associated to the color sienna.

Return Type: Color

Signatures:

#define COLOR_SIENNA
color color_sienna()

Color Silver

Color Silver

Generates a new Color associated to the color silver.

Return Type: Color

Signatures:

#define COLOR_SILVER
color color_silver()

Color Sky Blue

Color Sky Blue

Generates a new Color associated to the color sky_blue.

Return Type: Color

Signatures:

#define COLOR_SKY_BLUE
color color_sky_blue()

Color Slate Blue

Color Slate Blue

Generates a new Color associated to the color slate_blue.

Return Type: Color

Signatures:

#define COLOR_SLATE_BLUE
color color_slate_blue()

Color Slate Gray

Color Slate Gray

Generates a new Color associated to the color slate_gray.

Return Type: Color

Signatures:

#define COLOR_SLATE_GRAY
color color_slate_gray()

Color Snow

Color Snow

Generates a new Color associated to the color snow.

Return Type: Color

Signatures:

#define COLOR_SNOW
color color_snow()

Color Spring Green

Color Spring Green

Generates a new Color associated to the color spring_green.

Return Type: Color

Signatures:

#define COLOR_SPRING_GREEN
color color_spring_green()

Color Steel Blue

Color Steel Blue

Generates a new Color associated to the color steel_blue.

Return Type: Color

Signatures:

#define COLOR_STEEL_BLUE
color color_steel_blue()

Color Swinburne Red

Color Swinburne Red

Generates a new Color associated to the color swinburne_red.

Return Type: Color

Signatures:

#define COLOR_SWINBURNE_RED
color color_swinburne_red()

Color Tan

Color Tan

Generates a new Color associated to the color tan.

Return Type: Color

Signatures:

#define COLOR_TAN
color color_tan()

Color Teal

Color Teal

Generates a new Color associated to the color teal.

Return Type: Color

Signatures:

#define COLOR_TEAL
color color_teal()

Color Thistle

Color Thistle

Generates a new Color associated to the color thistle.

Return Type: Color

Signatures:

#define COLOR_THISTLE
color color_thistle()

Color To String

Returns a string representation of the color. Format will be a hex string starting with a #, followed by the red, green, blue, and alpha values of the color.

Parameters:

NameTypeDescription
cColorThe color

Return Type: String

Signatures:

string color_to_string(color c)

Color Tomato

Color Tomato

Generates a new Color associated to the color tomato.

Return Type: Color

Signatures:

#define COLOR_TOMATO
color color_tomato()

Color Transparent

Color Transparent

Generates a new Color associated to the color transparent.

Return Type: Color

Signatures:

#define COLOR_TRANSPARENT
color color_transparent()

Color Turquoise

Color Turquoise

Generates a new Color associated to the color turquoise.

Return Type: Color

Signatures:

#define COLOR_TURQUOISE
color color_turquoise()

Color Violet

Color Violet

Generates a new Color associated to the color violet.

Return Type: Color

Signatures:

#define COLOR_VIOLET
color color_violet()

Color Wheat

Color Wheat

Generates a new Color associated to the color wheat.

Return Type: Color

Signatures:

#define COLOR_WHEAT
color color_wheat()

Color White

Color White

Generates a new Color associated to the color white.

Return Type: Color

Signatures:

#define COLOR_WHITE
color color_white()

Color White Smoke

Color White Smoke

Generates a new Color associated to the color white_smoke.

Return Type: Color

Signatures:

#define COLOR_WHITE_SMOKE
color color_white_smoke()

Color Yellow

Color Yellow

Generates a new Color associated to the color yellow.

Return Type: Color

Signatures:

#define COLOR_YELLOW
color color_yellow()

Color Yellow Green

Color Yellow Green

Generates a new Color associated to the color yellow_green.

Return Type: Color

Signatures:

#define COLOR_YELLOW_GREEN
color color_yellow_green()

Green Of

Returns the green of the supplied color.

Parameters:

NameTypeDescription
cColorThe color

Return Type: Integer

Signatures:

int green_of(color c)

Hsb Color

Returs a color from a combination of hue, saturation, and brightness.

Parameters:

NameTypeDescription
hueDoubleThe hue of the color. Value must be between 0 and 1.
saturationDoubleThe saturation of that hue. Value must be between 0 and 1.
brightnessDoubleThe brightness of the color. Value must be between 0 and 1.

Return Type: Color

Signatures:

color hsb_color(double hue, double saturation, double brightness)

Hue Of

Returns the hue of the supplied color.

Parameters:

NameTypeDescription
cColorThe color

Return Type: Double

Signatures:

double hue_of(color c)

Random Color

Creates and returns a random color where the color and its opacity are random.

Return Type: Color

Signatures:

color random_color()

Random Rgb Color

Creates and returns a random color where the color is random, but the opacity is set to the passed in value.

Parameters:

NameTypeDescription
alphaIntegerThe set alpha (opacity) value (between 0 and 255)

Return Type: Color

Signatures:

color random_rgb_color(int alpha)

Red Of

Returns the red of the supplied color.

Parameters:

NameTypeDescription
cColorThe color

Return Type: Integer

Signatures:

int red_of(color c)

Rgb Color

Rgb Color

Gets a color given its RGB components. Each of the components has a value between 0 and 1.

Parameters:

NameTypeDescription
redDoubleThe red component
greenDoubleThe green component
blueDoubleThe blue component

Return Type: Color

Signatures:

color rgb_color(double red, double green, double blue)

Rgb Color

Gets a color given its RGB components. Each of the components has a value between 0 and 255.

Parameters:

NameTypeDescription
redIntegerThe red component
greenIntegerThe green component
blueIntegerThe blue component

Return Type: Color

Signatures:

color rgb_color(int red, int green, int blue)

Rgba Color

Rgba Color

Gets a color given its color components. Each of the components has a value between 0 and 1.0.

Parameters:

NameTypeDescription
redDoubleThe red component (between 0 and 1.0)
greenDoubleThe green component (between 0 and 1.0)
blueDoubleThe blue component (between 0 and 1.0)
alphaDoubleThe alpha (opacity) component (between 0 and 1.0)

Return Type: Color

Signatures:

color rgba_color(double red, double green, double blue, double alpha)

Rgba Color

Gets a color given its color components. Each of the components has a value between 0 and 255.

Parameters:

NameTypeDescription
redIntegerThe red component (between 0 and 255)
greenIntegerThe green component (between 0 and 255)
blueIntegerThe blue component (between 0 and 255)
alphaIntegerThe alpha (opacity) component (between 0 and 255)

Return Type: Color

Signatures:

color rgba_color(int red, int green, int blue, int alpha)

Saturation Of

Returns the saturation of the supplied color.

Parameters:

NameTypeDescription
cColorThe color

Return Type: Double

Signatures:

double saturation_of(color c)

String To Color

Returns a color for the passed in color string. The format must be #, followed by the hex values for the red, green, blue, and alpha components of the color.

Parameters:

NameTypeDescription
strStringThe hex string representing the color

Return Type: Color

Signatures:

color string_to_color(string str)