Skip to content

Repository files navigation

Based

A Base16 / Base24 color scheme editor built with Rust and egui.


Based screenshot

Features

  • Load and edit Base16 and Base24 YAML color scheme files
  • Import images and extract ranked Base16/Base24 palette variants
  • Visual swatch grid with single, multi, and range selection
  • Color editing in RGB, HSV, Oklab, and Oklch spaces
  • Perceptually uniform batch adjustments across selected colors
  • WCAG contrast checking and accent lightness audit
  • Semantic slot remap tool to reassign accent roles across the palette
  • Copy / paste swatch colors as hex
  • Live terminal and code preview panes
  • YAML output panel
  • Undo / redo with snapshot-based history
  • Built-in presets (Tokyo Night Moon, Dracula, Solarized Dark, and more)
  • Icon toolbar and dockable, rearrangeable panel layout

Build

Requires a recent stable Rust toolchain.

cargo build --release --locked
cargo run --release --locked

Release and CI builds enforce the committed Cargo.lock. To update dependencies intentionally, run cargo update, review the lockfile diff, and commit it with the dependency change.

Install

User install to ~/.local (no root needed; make sure ~/.local/bin is on PATH):

make install

System-wide install:

sudo make install PREFIX=/usr/local

This places the binary on PATH, registers a based.desktop launcher, and installs the application icon under share/pixmaps. Uninstall mirrors install: make uninstall (or with the same PREFIX for system installs).

Release Checks

Before publishing a release, run:

cargo fmt --all -- --check
cargo test --locked
cargo clippy --locked --all-targets --all-features -- -D warnings
cargo build --release --locked
cargo package --locked

GitHub Actions runs the same checks for pushes and pull requests, including an audit of packaged files.

Usage

ActionInput
Open fileCtrl+O
SaveCtrl+S
Import image(s)File -> Import Image…
Browse folder importFile -> Import Folder…
Select allCtrl+A
DeselectEscape
Undo / RedoCtrl+Z / Ctrl+Shift+Z
Copy swatch hexCtrl+C
Paste swatch hexCtrl+V
Multi-selectCtrl+Click
Range selectShift+Click

Image Import

Imported images use a two-phase pipeline:

  1. Decode and show a display preview immediately.
  2. Build extraction bins in the background.

Palette extraction becomes available once all selected images finish phase 2. This keeps large-image imports responsive while preserving extraction quality for the current preview-based pipeline.

Format Support

Handles flat and nested Base16/Base24 YAML files, including the system: / name: (or scheme:) / author: / variant: spec fields and all common hex variants (#RGB, #RRGGBB, #RRGGBBAA, 0xRRGGBB, bare RRGGBB).

About

A Base16/24 Colorscheme Editor

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages