• 1.5.0 4b0de79da1

    v1.5.0 Stable

    smgr released this 2025-12-20 12:28:30 +00:00 | 15 commits to master since this release

    The CLI generation model

    v1.5.0 introduces the full CLI templatization pipeline for generating custom application themes from the monobiome palette. Scheme files assign palette values to variables, and app config templates refer to those variables. As a result, the scheme file is color-agnostic (behavior remains the same if palette values change), and config templates are palette-agnostic (depends only on scheme variables).

    Theme generation pipeline diagram

    The monobiome CLI provides three actions: palette, scheme, and fill, and can be installed from PyPI using uv/pipx/similar:

    uv tool install monobiome
    # or
    pipx install monobiome
    

    One can generate an app config file by first creating a scheme and using it to fill a config template:

    monobiome scheme dark grassland -d 0.42 -l 20 -o scheme.toml
    monobiome fill scheme.toml templates/kitty/active.theme -o kitty.theme
    

    How the monobiome palette gets used to create themes is controllable entirely by parameters to the monobiome scheme subcommand (e.g., light or dark, base background lightness, contrast, etc). Full CLI usage details are as follows:

    • monobiome palette: generate palette files from raw parameterized curves

      usage: monobiome palette [-h] [-n {hex,oklch}] [-f {json,toml}] [-o OUTPUT]
      
      options:
        -n {hex,oklch}, --notation {hex,oklch}
                              color notation to export (either hex or oklch)
        -f {json,toml}, --format {json,toml}
                              format of palette file (either JSON or TOML)
        -o OUTPUT, --output OUTPUT
                              output file to write palette content
      
    • monobiome scheme: generate scheme files that match perceptual parameters

      usage: monobiome scheme [-h] [-m {wcag,oklch,lightness}] [-d DISTANCE] [-o OUTPUT] [-l L_BASE]
                              [--l-step L_STEP] [--fg-gap FG_GAP] [--grey-gap GREY_GAP]
                              [--term-fg-gap TERM_FG_GAP]
                              {dark,light}
                              {alpine,badlands,chaparral,savanna,grassland,reef,tundra,heathland,moorland}
      
      positional arguments:
        {dark,light}          scheme mode (light or dark)
        {alpine,badlands,chaparral,savanna,grassland,reef,tundra,heathland,moorland}
                              biome setting for scheme.
      
      options:
        -m {wcag,oklch,lightness}, --metric {wcag,oklch,lightness}
                              metric to use for measuring swatch distances.
        -d DISTANCE, --distance DISTANCE
                              distance threshold for specified metric
        -o OUTPUT, --output OUTPUT
                              output file to write scheme content
        -l L_BASE, --l-base L_BASE
                              minimum lightness level (default: 20)
        --l-step L_STEP       lightness step size (default: 5)
        --fg-gap FG_GAP       foreground lightness gap (default: 50)
        --grey-gap GREY_GAP   grey lightness gap (default: 30)
        --term-fg-gap TERM_FG_GAP
                              terminal foreground lightness gap (default: 60)
      
    • monobiome fill: produce concrete application themes from a given scheme and
      app template

      usage: monobiome fill [-h] [-p PALETTE] [-o OUTPUT] scheme [template]
      
      positional arguments:
        scheme                scheme file path
        template              template file path (defaults to stdin)
      
      options:
        -p PALETTE, --palette PALETTE
                              palette file to use for color definitions
        -o OUTPUT, --output OUTPUT
                              output file to write filled template
      
    Downloads