canvas


Color Module

Utility module for working with colors

Types

Type Description

color

Type representing colors

Functions and values

Function or value Description

aliceBlue

Full Usage: aliceBlue

Returns: color

The color aliceBlue

Returns: color

antiqueWhite

Full Usage: antiqueWhite

Returns: color

The color antiqueWhite

Returns: color

aqua

Full Usage: aqua

Returns: color

The color aqua

Returns: color

aquamarine

Full Usage: aquamarine

Returns: color

The color aquamarine

Returns: color

azure

Full Usage: azure

Returns: color

The color azure

Returns: color

beige

Full Usage: beige

Returns: color

The color beige

Returns: color

bisque

Full Usage: bisque

Returns: color

The color bisque

Returns: color

black

Full Usage: black

Returns: color

The color black

Returns: color

blanchedAlmond

Full Usage: blanchedAlmond

Returns: color

The color blanchedAlmond

Returns: color

blue

Full Usage: blue

Returns: color

The color blue

Returns: color

blueViolet

Full Usage: blueViolet

Returns: color

The color blueViolet

Returns: color

brown

Full Usage: brown

Returns: color

The color brown

Returns: color

burlyWood

Full Usage: burlyWood

Returns: color

The color burlyWood

Returns: color

cadetBlue

Full Usage: cadetBlue

Returns: color

The color cadetBlue

Returns: color

chartreuse

Full Usage: chartreuse

Returns: color

The color chartreuse

Returns: color

chocolate

Full Usage: chocolate

Returns: color

The color chocolate

Returns: color

coral

Full Usage: coral

Returns: color

The color coral

Returns: color

cornflowerBlue

Full Usage: cornflowerBlue

Returns: color

The color cornflowerBlue

Returns: color

cornsilk

Full Usage: cornsilk

Returns: color

The color cornsilk

Returns: color

crimson

Full Usage: crimson

Returns: color

The color crimson

Returns: color

cyan

Full Usage: cyan

Returns: color

The color cyan

Returns: color

darkBlue

Full Usage: darkBlue

Returns: color

The color darkBlue

Returns: color

darkCyan

Full Usage: darkCyan

Returns: color

The color darkCyan

Returns: color

darkGoldenrod

Full Usage: darkGoldenrod

Returns: color

The color darkGoldenrod

Returns: color

darkGray

Full Usage: darkGray

Returns: color

The color darkGray

Returns: color

darkGreen

Full Usage: darkGreen

Returns: color

The color darkGreen

Returns: color

darkGrey

Full Usage: darkGrey

Returns: color

The color darkGrey

Returns: color

darkKhaki

Full Usage: darkKhaki

Returns: color

The color darkKhaki

Returns: color

darkMagenta

Full Usage: darkMagenta

Returns: color

The color darkMagenta

Returns: color

darkOliveGreen

Full Usage: darkOliveGreen

Returns: color

The color darkOliveGreen

Returns: color

darkOrange

Full Usage: darkOrange

Returns: color

The color darkOrange

Returns: color

darkOrchid

Full Usage: darkOrchid

Returns: color

The color darkOrchid

Returns: color

darkRed

Full Usage: darkRed

Returns: color

The color darkRed

Returns: color

darkSalmon

Full Usage: darkSalmon

Returns: color

The color darkSalmon

Returns: color

darkSeaGreen

Full Usage: darkSeaGreen

Returns: color

The color darkSeaGreen

Returns: color

darkSlateBlue

Full Usage: darkSlateBlue

Returns: color

The color darkSlateBlue

Returns: color

darkSlateGray

Full Usage: darkSlateGray

Returns: color

The color darkSlateGray

Returns: color

darkSlateGrey

Full Usage: darkSlateGrey

Returns: color

The color darkSlateGrey

Returns: color

darkTurquoise

Full Usage: darkTurquoise

Returns: color

The color darkTurquoise

Returns: color

darkViolet

Full Usage: darkViolet

Returns: color

The color darkViolet

Returns: color

deepPink

Full Usage: deepPink

Returns: color

The color deepPink

Returns: color

deepSkyBlue

Full Usage: deepSkyBlue

Returns: color

The color deepSkyBlue

Returns: color

dimGray

Full Usage: dimGray

Returns: color

The color dimGray

Returns: color

dimGrey

Full Usage: dimGrey

Returns: color

The color dimGrey

Returns: color

dodgerBlue

Full Usage: dodgerBlue

Returns: color

The color dodgerBlue

Returns: color

firebrick

Full Usage: firebrick

Returns: color

The color firebrick

Returns: color

floralWhite

Full Usage: floralWhite

Returns: color

The color floralWhite

Returns: color

forestGreen

Full Usage: forestGreen

Returns: color

The color forestGreen

Returns: color

fromRgb r g b

Full Usage: fromRgb r g b

Parameters:
    r : int - The amount of red.
    g : int - The amount of green.
    b : int - The amount of blue.

Returns: color A color.

Generate a non-transparent color.

The fromRgba produces the color representation of the given red, green, blue. All values are en the range 0 to 255 and in the example:

    fromRgba 255 0 0
the resulting color is (non-transparent) red.

r : int

The amount of red.

g : int

The amount of green.

b : int

The amount of blue.

Returns: color

A color.

fromRgba r g b a

Full Usage: fromRgba r g b a

Parameters:
    r : int - The amount of red.
    g : int - The amount of green.
    b : int - The amount of blue.
    a : int - The degree to which the color is transparent.

Returns: color A color.

Generate a color.

The fromRgba produces the color representation of the given red, green, blue, and alpha values. All values are en the range 0 to 255 and in the example:

    fromRgba 255 0 0 128
the resulting color is semi-transparent red.

r : int

The amount of red.

g : int

The amount of green.

b : int

The amount of blue.

a : int

The degree to which the color is transparent.

Returns: color

A color.

fuchsia

Full Usage: fuchsia

Returns: color

The color fuchsia

Returns: color

gainsboro

Full Usage: gainsboro

Returns: color

The color gainsboro

Returns: color

ghostWhite

Full Usage: ghostWhite

Returns: color

The color ghostWhite

Returns: color

gold

Full Usage: gold

Returns: color

The color gold

Returns: color

goldenrod

Full Usage: goldenrod

Returns: color

The color goldenrod

Returns: color

gray

Full Usage: gray

Returns: color

The color gray

Returns: color

green

Full Usage: green

Returns: color

The color green

Returns: color

greenYellow

Full Usage: greenYellow

Returns: color

The color greenYellow

Returns: color

grey

Full Usage: grey

Returns: color

The color grey

Returns: color

honeydew

Full Usage: honeydew

Returns: color

The color honeydew

Returns: color

hotPink

Full Usage: hotPink

Returns: color

The color hotPink

Returns: color

indianRed

Full Usage: indianRed

Returns: color

The color indianRed

Returns: color

indigo

Full Usage: indigo

Returns: color

The color indigo

Returns: color

ivory

Full Usage: ivory

Returns: color

The color ivory

Returns: color

khaki

Full Usage: khaki

Returns: color

The color khaki

Returns: color

lavender

Full Usage: lavender

Returns: color

The color lavender

Returns: color

lavenderBlush

Full Usage: lavenderBlush

Returns: color

The color lavenderBlush

Returns: color

lawnGreen

Full Usage: lawnGreen

Returns: color

The color lawnGreen

Returns: color

lemonChiffon

Full Usage: lemonChiffon

Returns: color

The color lemonChiffon

Returns: color

lightBlue

Full Usage: lightBlue

Returns: color

The color lightBlue

Returns: color

lightCoral

Full Usage: lightCoral

Returns: color

The color lightCoral

Returns: color

lightCyan

Full Usage: lightCyan

Returns: color

The color lightCyan

Returns: color

lightGoldenrodYellow

Full Usage: lightGoldenrodYellow

Returns: color

The color lightGoldenrodYellow

Returns: color

lightGray

Full Usage: lightGray

Returns: color

The color lightGray

Returns: color

lightGreen

Full Usage: lightGreen

Returns: color

The color lightGreen

Returns: color

lightGrey

Full Usage: lightGrey

Returns: color

The color lightGrey

Returns: color

lightPink

Full Usage: lightPink

Returns: color

The color lightPink

Returns: color

lightSalmon

Full Usage: lightSalmon

Returns: color

The color lightSalmon

Returns: color

lightSeaGreen

Full Usage: lightSeaGreen

Returns: color

The color lightSeaGreen

Returns: color

lightSkyBlue

Full Usage: lightSkyBlue

Returns: color

The color lightSkyBlue

Returns: color

lightSlateGray

Full Usage: lightSlateGray

Returns: color

The color lightSlateGray

Returns: color

lightSlateGrey

Full Usage: lightSlateGrey

Returns: color

The color lightSlateGrey

Returns: color

lightSteelBlue

Full Usage: lightSteelBlue

Returns: color

The color lightSteelBlue

Returns: color

lightYellow

Full Usage: lightYellow

Returns: color

The color lightYellow

Returns: color

lime

Full Usage: lime

Returns: color

The color lime

Returns: color

limeGreen

Full Usage: limeGreen

Returns: color

The color limeGreen

Returns: color

linen

Full Usage: linen

Returns: color

The color linen

Returns: color

magenta

Full Usage: magenta

Returns: color

The color magenta

Returns: color

maroon

Full Usage: maroon

Returns: color

The color maroon

Returns: color

mediumAquamarine

Full Usage: mediumAquamarine

Returns: color

The color mediumAquamarine

Returns: color

mediumBlue

Full Usage: mediumBlue

Returns: color

The color mediumBlue

Returns: color

mediumOrchid

Full Usage: mediumOrchid

Returns: color

The color mediumOrchid

Returns: color

mediumPurple

Full Usage: mediumPurple

Returns: color

The color mediumPurple

Returns: color

mediumSeaGreen

Full Usage: mediumSeaGreen

Returns: color

The color mediumSeaGreen

Returns: color

mediumSlateBlue

Full Usage: mediumSlateBlue

Returns: color

The color mediumSlateBlue

Returns: color

mediumSpringGreen

Full Usage: mediumSpringGreen

Returns: color

The color mediumSpringGreen

Returns: color

mediumTurquoise

Full Usage: mediumTurquoise

Returns: color

The color mediumTurquoise

Returns: color

mediumVioletRed

Full Usage: mediumVioletRed

Returns: color

The color mediumVioletRed

Returns: color

midnightBlue

Full Usage: midnightBlue

Returns: color

The color midnightBlue

Returns: color

mintCream

Full Usage: mintCream

Returns: color

The color mintCream

Returns: color

mistyRose

Full Usage: mistyRose

Returns: color

The color mistyRose

Returns: color

moccasin

Full Usage: moccasin

Returns: color

The color moccasin

Returns: color

navajoWhite

Full Usage: navajoWhite

Returns: color

The color navajoWhite

Returns: color

navy

Full Usage: navy

Returns: color

The color navy

Returns: color

oldLace

Full Usage: oldLace

Returns: color

The color oldLace

Returns: color

olive

Full Usage: olive

Returns: color

The color olive

Returns: color

oliveDrab

Full Usage: oliveDrab

Returns: color

The color oliveDrab

Returns: color

orange

Full Usage: orange

Returns: color

The color orange

Returns: color

orangeRed

Full Usage: orangeRed

Returns: color

The color orangeRed

Returns: color

orchid

Full Usage: orchid

Returns: color

The color orchid

Returns: color

paleGoldenrod

Full Usage: paleGoldenrod

Returns: color

The color paleGoldenrod

Returns: color

paleGreen

Full Usage: paleGreen

Returns: color

The color paleGreen

Returns: color

paleTurquoise

Full Usage: paleTurquoise

Returns: color

The color paleTurquoise

Returns: color

paleVioletRed

Full Usage: paleVioletRed

Returns: color

The color paleVioletRed

Returns: color

papayaWhip

Full Usage: papayaWhip

Returns: color

The color papayaWhip

Returns: color

peachPuff

Full Usage: peachPuff

Returns: color

The color peachPuff

Returns: color

peru

Full Usage: peru

Returns: color

The color peru

Returns: color

pink

Full Usage: pink

Returns: color

The color pink

Returns: color

plum

Full Usage: plum

Returns: color

The color plum

Returns: color

powderBlue

Full Usage: powderBlue

Returns: color

The color powderBlue

Returns: color

purple

Full Usage: purple

Returns: color

The color purple

Returns: color

rebeccaPurple

Full Usage: rebeccaPurple

Returns: color

The color rebeccaPurple

Returns: color

red

Full Usage: red

Returns: color

The color red

Returns: color

rosyBrown

Full Usage: rosyBrown

Returns: color

The color rosyBrown

Returns: color

royalBlue

Full Usage: royalBlue

Returns: color

The color royalBlue

Returns: color

saddleBrown

Full Usage: saddleBrown

Returns: color

The color saddleBrown

Returns: color

salmon

Full Usage: salmon

Returns: color

The color salmon

Returns: color

sandyBrown

Full Usage: sandyBrown

Returns: color

The color sandyBrown

Returns: color

seaGreen

Full Usage: seaGreen

Returns: color

The color seaGreen

Returns: color

seaShell

Full Usage: seaShell

Returns: color

The color seaShell

Returns: color

sienna

Full Usage: sienna

Returns: color

The color sienna

Returns: color

silver

Full Usage: silver

Returns: color

The color silver

Returns: color

skyBlue

Full Usage: skyBlue

Returns: color

The color skyBlue

Returns: color

slateBlue

Full Usage: slateBlue

Returns: color

The color slateBlue

Returns: color

slateGray

Full Usage: slateGray

Returns: color

The color slateGray

Returns: color

slateGrey

Full Usage: slateGrey

Returns: color

The color slateGrey

Returns: color

snow

Full Usage: snow

Returns: color

The color snow

Returns: color

springGreen

Full Usage: springGreen

Returns: color

The color springGreen

Returns: color

steelBlue

Full Usage: steelBlue

Returns: color

The color steelBlue

Returns: color

tan

Full Usage: tan

Returns: color

The color tan

Returns: color

teal

Full Usage: teal

Returns: color

The color teal

Returns: color

thistle

Full Usage: thistle

Returns: color

The color thistle

Returns: color

tomato

Full Usage: tomato

Returns: color

The color tomato

Returns: color

transparent

Full Usage: transparent

Returns: color

The color transparent

Returns: color

turquoise

Full Usage: turquoise

Returns: color

The color turquoise

Returns: color

violet

Full Usage: violet

Returns: color

The color violet

Returns: color

wheat

Full Usage: wheat

Returns: color

The color wheat

Returns: color

white

Full Usage: white

Returns: color

The color white

Returns: color

whiteSmoke

Full Usage: whiteSmoke

Returns: color

The color whiteSmoke

Returns: color

yellow

Full Usage: yellow

Returns: color

The color yellow

Returns: color

yellowGreen

Full Usage: yellowGreen

Returns: color

The color yellowGreen

Returns: color