Pencil Code Reference > color names
The CSS standard has 140 named colors (and 10 alternate color names).
Click a color to try it.
These colors can be used when drawing with
or when using CSS properties.
Colors can also be created using numbers, using
It is possible to use semitransparent colors
rgba(r,g,b,a) instead of
b stand for "red", "green", and "blue" respectively,
and they represent a value from 0 to 255, specifying the intensity of
each hue. The fourth number,
a, is known as "alpha" and is the opacity
of the color.
Alpha of 1 is fully opaque, and anything less than 1
is like painting with watercolor. Alpha 0 is fully
transparent. The special color name
transparent stands for
transparent leaves the canvas perfectly
pen white is like using opaque white paint:
it covers any color with white, but it does not return
the canvas to its original transparent state.
The turtle drawing functions support a pseudo-color name
erase. When drawing with
pen erase, the
canvas is erased of color under the turtle and made transparent again.
erase, the pen is slightly enlarged
so that lines can be cleanly erased without leaving stray pixels.