color( col )

Sets the draw color in the draw state.

The color number.

Many graphics functions accept an optional color argument. When this argument is omitted, the current color of the draw state is used by default. The color() function sets this color.

The color number corresponds to the Pico-8 palette, a value between 0 and 15. See Graphics for an illustrated table of colors.

When you provide an explicit color argument to a graphics function, Pico-8 changes the draw color to that color.

The color() function honors the alternate palette set by pal().

Examples Edit

color(7)  -- white
circfill(20, 20, 10)
circfill(60, 60, 10)
color(8)  -- red
circfill(20, 60, 10)
circfill(60, 20, 10)
pal(7, 10)  -- white -> yellow
circfill(20, 100, 10)
circfill(60, 100, 10)

See also Edit