Palettes
A palette is a TOML file of named colors. Keep them in the directory set by palettes_path in your config.
Format#
A palette needs a [general] section with a name and a [colors] section with values in #RRGGBBAA. Alpha is optional; without it the color is opaque.
[general]
name = 'palette_name'
[colors]
variable_name = '#RRGGBBAA'
Palette example
[general]
name = 'dark'
[colors]
# General UI
background = '#111111FF'
on_background = '#D4D4D4FF'
surface = '#111111FF'
on_surface = '#D4D4D4FF'
surface_variant = '#191919FF'
on_surface_variant = '#D4D4D4FF'
surface_container = '#242424FF'
surface_high = '#333333FF'
border_focused = '#2E2E2EFF'
border = '#242424FF'
foreground = '#D2D2D2FF'
cursor = '#D2D2D2FF'
accent = '#9A8652FF'
accent_secondary = '#9A8652FF'
on_accent = '#111111FF'
on_accent_secondary = '#111111FF'
# Semantic
success = '#668A51FF'
info = '#3A898CFF'
warning = '#B47837FF'
error = '#AA4E4AFF'
on_success = '#D2D2D2FF'
on_info = '#D2D2D2FF'
on_warning = '#D2D2D2FF'
on_error = '#D2D2D2FF'
# Editor - Basic
editor_background = '#111111FF'
editor_foreground = '#D2D2D2FF'
editor_line_highlight = '#191919FF'
editor_selection = '#242424FF'
editor_selection_inactive = '#1D1C1CFF'
editor_cursor = '#D2D2D2FF'
editor_whitespace = '#3A3A3AFF'
# Editor - Gutter
editor_gutter_background = '#111111FF'
editor_gutter_foreground = '#849899FF'
editor_line_number = '#849899FF'
editor_line_number_active = '#D2D2D2FF'
# Editor - Syntax
editor_comment = '#849899FF'
editor_string = '#9A8652FF'
editor_number = '#B47837FF'
editor_boolean = '#B47837FF'
editor_keyword = '#3A898CFF'
editor_operator = '#D2D2D2FF'
editor_function = '#A9DC86FF'
editor_variable = '#D2D2D2FF'
editor_parameter = '#B0779EFF'
editor_property = '#9A8652FF'
editor_constant = '#B47837FF'
editor_type = '#3A898CFF'
editor_class = '#3A898CFF'
editor_interface = '#3A898CFF'
editor_enum = '#3A898CFF'
editor_namespace = '#B0779EFF'
editor_attribute = '#A9DC86FF'
editor_decorator = '#A9DC86FF'
editor_tag = '#AA4E4AFF'
editor_punctuation = '#D2D2D2FF'
editor_link = '#B0779EFF'
editor_regex = '#AA477BFF'
editor_escape_character = '#B47837FF'
# Editor - Diagnostics
editor_invalid = '#AA4E4AFF'
editor_error = '#AA4E4AFF'
editor_error_background = '#3A1A1AFF'
editor_warning = '#B47837FF'
editor_warning_background = '#3A2A1AFF'
editor_info = '#3A898CFF'
editor_info_background = '#1A2A3AFF'
editor_hint = '#668A51FF'
editor_hint_background = '#1A2A1AFF'
# Editor - UI Elements
editor_active_line_border = '#2E2E2EFF'
editor_indent_guide = '#2A2A2AFF'
editor_indent_guide_active = '#3A3A3AFF'
editor_bracket_match = '#3A898CFF'
editor_search_match = '#9A865280'
editor_search_match_active = '#9A8652FF'
editor_find_range_highlight = '#9A865240'
# Editor - Diff
editor_deleted = '#AA4E4AFF'
editor_inserted = '#668A51FF'
editor_modified = '#9A8652FF'
editor_ignored = '#849899FF'
editor_folded_background = '#191919FF'
# Terminal - base16
base00 = '#111111FF'
base01 = '#191919FF'
base02 = '#242424FF'
base03 = '#849899FF'
base04 = '#A8A8A8FF'
base05 = '#D2D2D2FF'
base06 = '#E4E4E4FF'
base07 = '#F4F4F4FF'
base08 = '#AA4E4AFF'
base09 = '#B47837FF'
base0A = '#9A8652FF'
base0B = '#668A51FF'
base0C = '#3A898CFF'
base0D = '#5A7CA8FF'
base0E = '#AA477BFF'
base0F = '#8A6A4AFF'
# Terminal - ANSI
term0 = '#111111FF'
term1 = '#AA4E4AFF'
term2 = '#668A51FF'
term3 = '#9A8652FF'
term4 = '#5A7CA8FF'
term5 = '#AA477BFF'
term6 = '#3A898CFF'
term7 = '#B5B5B5FF'
term8 = '#4A4A4AFF'
term9 = '#C46A66FF'
term10 = '#86AB6EFF'
term11 = '#BBA46BFF'
term12 = '#7C9CC8FF'
term13 = '#C66A99FF'
term14 = '#59A9ACFF'
term15 = '#F4F4F4FF'
base00-base0F follow the base16 convention: base00-base07 are a background-to-foreground ramp, base08-base0F are the accent hues (red, orange, yellow, green, cyan, blue, magenta, brown). term0-term15 are the ANSI 16-color palette in terminal order (black, red, green, yellow, blue, magenta, cyan, white, then the bright variants) — templates that render a terminal's color0-color15 should use term0-term15, not base00-base0F, since the two orderings don't match.
Color generation#
clrsync can build a palette from an image or a single color by calling hellwal, matugen or pywal16. The generator has to be installed separately. hellwal runs on Linux and macOS, matugen on Linux, macOS and Windows, and pywal16 on Linux only.
Generate from an image (default generator: hellwal):
clrsync_cli --generate /path/to/image.png
Generate from a hex color (requires matugen):
clrsync_cli --generate-color "#B44242" --generator matugen
Generator options#
Hellwal#
clrsync_cli --generate image.png --generator hellwal --hellwal-neon --hellwal-dark
Available options:
--hellwal-neon- Enable neon mode--hellwal-dark- Prefer dark palettes--hellwal-light- Prefer light palettes--hellwal-color- Enable color mode--hellwal-invert- Invert colors--hellwal-dark-offset <float>- Dark offset (default: 0.0)--hellwal-bright-offset <float>- Bright offset (default: 0.0)--hellwal-gray-scale <float>- Gray scale factor (default: 0.0)
Matugen#
clrsync_cli --generate image.png --generator matugen --matugen-mode dark --matugen-contrast 0.5
Available options:
--matugen-type <type>- Color scheme type (default: scheme-tonal-spot). Possible values: scheme-content, scheme-expressive, scheme-fidelity, scheme-fruit-salad, scheme-monochrome, scheme-neutral, scheme-rainbow, scheme-tonal-spot.--matugen-mode <mode>- Light or dark mode (default: "dark")--matugen-contrast <float>- Contrast value from -1 to 1 (default: 0.0)--matugen-source-color-index <int>- Source color index to use when generating from an image (0..3, default: 0)
Pywal16#
Requires
pywal16(provides thewalcommand) installed. Linux only.
clrsync_cli --generate image.png --generator pywal16 --pywal16-backend wal --pywal16-light
Available options:
--pywal16-backend <backend>- Color extraction backend to pass towal --backend--pywal16-background <hex>- Override the generated background color--pywal16-foreground <hex>- Override the generated foreground color--pywal16-saturate <float>- Color saturation from 0.0 to 1.0--pywal16-light- Generate a light colorscheme instead of dark
--generate-color is not supported with pywal16 (or hellwal) — it only works with --generator matugen.