Fandom

Pico-8 Wiki

Color

162pages on
this wiki
Add New Page
Comments0 Share
color( col )

Sets the draw color in the draw state.

col
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

cls()

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
color(7)
circfill(20, 100, 10)
circfill(60, 100, 10)
Color-example

See also Edit

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.