Color Graphics Language
[image of digits]

Color Theoryxxxxxxx
Understanding Color Spaces

Color is represented by three variables, with values from 0 to 255:
red
, green, blue.

The gamut of color is often displayed as a color cube with three dimensions:
red, green, blue.

The 8 corners of the color cube are shown in the rightmost column ->

RED value
GREEN value
BLUE value
Result
Notation
BGRX
hex code
255
255
255
WHITE
W
0xFFFFFF
255
0
0
RED
Additive
Primaries:
RGB
0x0000FF
0
255
0
GREEN
0x00FF00
0
0
255
BLUE
0xFF0000
0
255
255
CYAN
SubtractiveX
Primaries:
CMY
0xFFFF00
255
0
255
MAGENTA
0xFF00FF
255
255
0
YELLOW
0x00FFFF
0
0
0
BLACK
K
0x000000

Color Constants
Windows recognizes these color constants, representing the corners of the color cube (top row), plus darker variants (bottom row).
Windows also recognizes other colors (see the color combo-box in the properties tab of most visual components).

clRed
additive
primary
RED

clLime
additive
primary
GREEN

clBlue
additive
primary
BLUE

clAqua
subtractive
primary
CYAN

clFuchsia
subtractive
primary
MAGENTA

clYellow
subtractive
primary
YELLOW

clBlack
BLACK

clWhite
WHITE

clMaroon

clGreen
clNavy
clTeal
clPurple
clOlive
clGray
clSilver

All coordinates on your display are measured in pixels from the top left corner of the component.

Form Component
The Form component is the entire Window of your application. You can draw anywhere on a Window using Form1->Canvas.

PaintBox Component
The PaintBox component defines a smaller region within the Window on which your application can draw.
All measurements are relative to the top left corner of the PaintBox.
A
PaintBox
is useful for maintaining multiple visualizations on the screen at one time. Use it as you would use Form1->Canvas.

Canvas Shape Methods

Canvas Polygons and Polylines

Canvas Puting Pixels

Getting Pixels

Properties