Built-in Palettes

Pixelsrc includes several built-in palettes that can be referenced by name using the @name syntax. These palettes provide curated color sets for common pixel art styles.

Using Built-in Palettes

Reference a built-in palette with the @ prefix:

{"type": "sprite", "name": "retro_heart", "size": [3, 3], "palette": "@gameboy", "regions": {"dark": {"union": [{"points": [[1, 0]]}, {"points": [[0, 1], [2, 1]]}, {"points": [[1, 2]]}], "z": 0}, "light": {"points": [[1, 1]], "z": 1}}}

List available palettes:

pxl palettes

Show palette colors:

pxl palettes --show gameboy

Available Palettes

gameboy

Classic Game Boy 4-color green palette.

TokenColorHex
{_}Transparent#00000000
{lightest}#9BBC0F#9BBC0F
{light}#8BAC0F#8BAC0F
{dark}#306230#306230
{darkest}#0F380F#0F380F

Reference: Nintendo Game Boy (BGB) on Lospec

nes

NES-inspired palette with key representative colors.

TokenColorHex
{_}Transparent#00000000
{black}#000000#000000
{white}#FCFCFC#FCFCFC
{red}#A80020#A80020
{green}#00A800#00A800
{blue}#0058F8#0058F8
{cyan}#00B8D8#00B8D8
{yellow}#F8D800#F8D800
{orange}#F83800#F83800
{pink}#F878F8#F878F8
{brown}#503000#503000
{gray}#7C7C7C#7C7C7C
{skin}#FCB8B8#FCB8B8

Reference: Nintendo Entertainment System on Lospec

pico8

PICO-8 fantasy console 16-color palette.

TokenColorHex
{_}Transparent#00000000
{black}#000000#000000
{dark_blue}#1D2B53#1D2B53
{dark_purple}#7E2553#7E2553
{dark_green}#008751#008751
{brown}#AB5236#AB5236
{dark_gray}#5F574F#5F574F
{light_gray}#C2C3C7#C2C3C7
{white}#FFF1E8#FFF1E8
{red}#FF004D#FF004D
{orange}#FFA300#FFA300
{yellow}#FFEC27#FFEC27
{green}#00E436#00E436
{blue}#29ADFF#29ADFF
{indigo}#83769C#83769C
{pink}#FF77A8#FF77A8
{peach}#FFCCAA#FFCCAA

Reference: PICO-8 on Lospec

grayscale

8-shade grayscale palette from white to black.

TokenColorHex
{_}Transparent#00000000
{white}#FFFFFF#FFFFFF
{gray1}#DFDFDF#DFDFDF
{gray2}#BFBFBF#BFBFBF
{gray3}#9F9F9F#9F9F9F
{gray4}#7F7F7F#7F7F7F
{gray5}#5F5F5F#5F5F5F
{gray6}#3F3F3F#3F3F3F
{black}#000000#000000

1bit

Minimal 1-bit black and white palette.

TokenColorHex
{_}Transparent#00000000
{black}#000000#000000
{white}#FFFFFF#FFFFFF

dracula

Dracula theme palette for code editor aesthetics.

TokenColorHex
{_}Transparent#00000000
{background}#282A36#282A36
{current}#44475A#44475A
{foreground}#F8F8F2#F8F8F2
{comment}#6272A4#6272A4
{cyan}#8BE9FD#8BE9FD
{green}#50FA7B#50FA7B
{orange}#FFB86C#FFB86C
{pink}#FF79C6#FF79C6
{purple}#BD93F9#BD93F9
{red}#FF5555#FF5555
{yellow}#F1FA8C#F1FA8C

Reference: Dracula Theme

Transparent Color

All built-in palettes include the special transparent token {_} mapped to #00000000. This is the conventional token for transparency in Pixelsrc sprites.

Extending Built-in Palettes

You can use a built-in palette and add custom colors:

{"type": "palette", "name": "custom_gb", "extends": "@gameboy", "colors": {"{highlight}": "#FFFF00"}}

Or override existing colors:

{"type": "palette", "name": "warm_gb", "extends": "@gameboy", "colors": {"{lightest}": "#E8D8A0"}}