Graphics
Palette
PICO-8 starts up with both the draw and screen palettes set to the following indices & colors, with index 0 flagged as transparent in sprites and maps:
0 | 1 | 2 | 3 |
4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 |
The draw palette may be altered by calling pal(draw_palette_index, screen_palette_index). This allows remapping sprite and map colors.
The draw palette's transparency flags may be altered by calling palt(draw_palette_index, true/false). This allows cookie-cutter style transparency in sprites and maps.
The screen palette may be altered by calling pal(screen_palette_index, system_palette_index, 1). This allows rearranging the default colors, or swapping in some of the undocumented alternate colors in the range 128-143:
128 | 129 | 130 | 131 |
132 | 133 | 134 | 135 |
136 | 137 | 138 | 139 |
140 | 141 | 142 | 143 |
See Palette for many more details, as well as the specific RGB values for each palette color, which may be useful in external editors or on the web.
Functions
camera([x,] [y])
circ(x, y, r, [col])
circfill(x, y, r, [col])
clip([x,] [y,] [w,] [h])
cls()
color(col)
cursor(x, y)
fget(n, [f])
fillp([pat])
fset(n, [f,] [v])
line(x0, y0, x1, y1, [col])
pal([c0,] [c1,] [p])
palt([c,] [t])
pget(x, y)
print(str, [x,] [y,] [col])
pset(x, y, [c])
rect(x0, y0, x1, y1, [col])
rectfill(x0, y0, x1, y1, [col])
sget(x, y)
spr(n, x, y, [w,] [h,] [flip_x,] [flip_y])
sset(x, y, [c])
sspr(sx, sy, sw, sh, dx, dy, [dw,] [dh,] [flip_x,] [flip_y])
See also API Reference.