Index

# Color

## Format

color colorname
color ( colorname )
color red, blue, green
color ( red, blue, green )
color rgb_value
color ( rgb_value )

## Description

Sets the current drawing color to colorname; to RGB color made up of red, blue, green components; or to RGB value. There is a special color named CLEAR, with a value of -1. If the current color is set to this value the pixels or shapes drawn will clear the pixels of the graphics output area and make them transparent. This is especially useful when creating sprites using the Spriteslice command.

Color names and RGB values |  |  |
--- | --- | --- | ---
Color Name | RGB Values |
black | 0, 0, 0 | ~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~
white | 255, 255, 255 | ~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~
red | 255, 0, 0 | ~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~
darkred | 128, 0, 0 | ~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~
green | 0, 255, 0 | ~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~
darkgreen | 0, 128, 0 | ~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~
blue | 0, 0, 255 | ~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~
darkblue | 0, 0, 128 | ~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~
cyan | 0, 255, 255 | ~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~
darkcyan | 0, 128, 128 | ~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~
purple | 255, 0, 255 | ~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~
darkpurple | 128, 0, 128 | ~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~
yellow | 255, 255, 0 | ~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~
darkyellow | 128, 128 ,0 | ~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~
orange | 255, 102, 0 | ~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~
darkorange | 176, 61 ,0 | ~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~
grey | 164, 164 ,164 | ~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~
darkgrey | 128, 128 ,128 | ~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~~~SP~~
clear | -1 | ~~SP~~

## See Also

Rgb, GetColor

## Example

    clg
    color rgb(128,128,128)
    rect 0,0,graphwidth, graphheight
    color red
    circle 100,100,50
    color 255,160,160
    circle 100,100,25

Will draw a grey rectangle with a red circle with a pink middle.

## New To Version

0.9.5m