Constants and Colors

Constants

The following constants evaluate to the provided numbers:

NameValueDescription
pi3.141592pi
e2.71828Euler's number

Colors

JSLogo can define colors with the color/shade paradigm, or using HTML colors. These include named strings like 'black' and 'light blue' or hex codes like #bcbcbc.

When using the Logo color codes, users can set a base color followed by a shade. Shade is a number from 0 to 100, with the lower number beign darker and the higher number being lighter. The default is 50. Colors are as follows:

Color CodeColor
0red
10orange
20yellow
30green
40blue-green
50aqua
60blue
70darker blue
80purple
90bright pink
100red (again)
Last updated on December 21, 2022