Palette
A palette defines the core colors for your theme—used for backgrounds, text, accents, and terminal colors. Palettes are the foundation for your style and are referenced throughout your styles, themes, and modules.
Palette structure
Here's how a palette is structured:
term
: 16 terminal colors (color0
–color15
)normal
: background (bg
) and foreground (fg
) for general UIprimary
: main accent color (bg
andfg
)secondary
: secondary accent color (bg
andfg
)
Example:
Global palettes
A global palette is a reusable palette stored in PIMP_CONFIG_DIR/palettes/
. You can create your own or use the built-in ones. Global palettes can be referenced in your themes and modes for easy sharing and switching.
You can edit or create a global palette with:
Using palettes in themes
Each theme can define its own palette for each mode (e.g. dark, light), or reference a global palette using from_global
:
You can also define a palette inline in your theme or mode:
Palette generators
Palettes can automatically generate from images using palette generators. This is how pimp gen
works: it extracts colors from your wallpaper to create a matching palette.
You can add your own palette generators in PIMP_CONFIG_DIR/palette_generators/
. The filename will be the name of the generator/mode.
Use default dark as a starting point.
If the name of the custom palette generator is the same as a built-in one (eg: "dark"), the custom generator will be used.
Tips & Tricks
- Use palette fields in your styles with Jinja references, e.g.
{{primary.bg}}
,{{term.color4}}
. - All palette fields are required for a valid palette.
- You can list available palettes with:
- See theme_dict for how palettes are merged into the final config.