Introduction
Asinus is a TUI application for exploring, previewing, and comparing terminal color themes.
Key Features
- Preview themes with built-in samples or your own text, and compare them side by side.
- Search by name, appearance, background color, brightness, and text contrast.
- Inspect color values and credits, mark favorites, and save search conditions.
Themes are bundled from VHS, so browsing works offline.
Built with Rust and Ratatui. Asinus is available on GitHub under the MIT License.
The bundled theme data retains VHS's MIT license.
Getting Started
Use a True Color terminal with at least 60 columns and 22 rows. See Compatibility for platform and clipboard requirements.
Installation
Cargo
Install from crates.io with Rust 1.89 or later:
cargo install --locked asinus
Homebrew (macOS)
brew install lusingander/tap/asinus
The formula is maintained in lusingander/homebrew-tap.
Release Binaries
Download an archive from GitHub Releases, extract it, and place the asinus executable on your PATH.
| Operating system | Architecture | Target |
|---|---|---|
| macOS | Apple Silicon | aarch64-apple-darwin |
| macOS | Intel | x86_64-apple-darwin |
| Linux | ARM64 | aarch64-unknown-linux-gnu or aarch64-unknown-linux-musl |
| Linux | x86-64 | x86_64-unknown-linux-gnu or x86_64-unknown-linux-musl |
First Steps
Start Asinus:
asinus
- Use
↑/↓to select a theme. - Press
pto pin it, then select another theme and presscto compare them. - Use
[/]to switch preview samples, or/to search. - Press
F1for help andCtrl-Cto quit.
Continue with Explore & Compare or try your own preview sample. See Keybindings for all controls.
Run asinus --help for command line help and asinus --version to check the installed version.
Explore & Compare
Explore shows the selected theme, called Current. Pin a theme to keep it as a reference while browsing other candidates, then use Compare to view Pin and Current side by side or stacked vertically.
The pin stays available when you change search conditions. You can hide the theme list to give previews more room.
Preview Samples
Compare shows the same portion of the selected sample for both themes. Content extending beyond the preview is clipped.
Previews show theme colors within Asinus. Use Theme Details to inspect colors and find source links.
Built-in Samples
| Sample | Content |
|---|---|
| Palette | Foreground, background, ANSI colors, and text attributes |
| Shell | A prompt, file listings, and command output |
| Git | Diffs, commits, and branches |
| Logs | Timestamps, log levels, and messages |
| TUI | Lists, tables, selections, and bars |
| Code | A Rust syntax sample |
These samples show how the theme's colors work together. Applications may use different color assignments.
The preview selector offers Auto, Small, Medium, and Large content sizes. Auto chooses a size for the available area. Fixed sizes keep the same content when resizing.
Custom Samples
Use -p, --preview <FILE> to load a file as the Custom sample for the current run. Use - as the file argument to read from stdin.
asinus --preview sample.txt
git diff --color=always | asinus -p -
Input must be nonempty UTF-8 text, up to 1 MiB. When reading from stdin, Asinus waits for EOF before opening the TUI. The TUI requires an interactive terminal.
The preview supports ANSI colors and text attributes such as bold and underline. Color indices 0–15 use the selected theme's palette. Indices 16–255 and explicit RGB colors retain their specified values.
Operations
In Explore / Compare:
| Keys | Action |
|---|---|
↑ / ↓ | Select the previous / next theme |
p | Pin the selected theme, replace the pin, or unpin it if already pinned |
c | Toggle Compare; requires a pin |
v | Toggle side-by-side / stacked comparison |
z | Show or hide the theme list |
[ / ] | Select the previous / next preview sample |
P | Open the preview selector |
In the preview selector:
| Keys | Action |
|---|---|
Tab | Switch between Sample and Content for built-in samples |
← / → | Change the selected value |
Enter | Apply the preview settings |
See Keybindings for all controls.
Search & Filters
Search accepts theme names and filter expressions. Filters provides fields for the same conditions. All terms and conditions are combined with AND.
Name Search
Name terms match substrings. Lowercase terms ignore case; a term containing an uppercase letter is case-sensitive. Multiple terms can appear in any order in the theme name.
Use double quotes to match a phrase or a literal term containing :. Inside quotes, use \" for a quote and \\ for a backslash.
catpp mocha
"Solarized Dark"
catpp type:dark bg:blue contrast:medium
Results stay in case-sensitive theme-name order, with no relevance ranking.
Conditions
Filter keys and values are lowercase. Each key can appear once in a query. Omitting a key removes that restriction, except that ignored themes are hidden by default.
| Field | Search expressions | Meaning |
|---|---|---|
| Appearance | type:dark, type:light | The theme's registered appearance |
| Favorite | favorite:true, favorite:false | Include only favorites, or exclude them |
| Ignored | ignore:false, ignore:all, ignore:true | Hide ignored themes (default), show all, or show only ignored themes |
The remaining fields classify the background and foreground colors. Appearance uses theme metadata and is independent of background brightness.
Background Brightness
Background brightness uses OKLCH lightness, scaled to L = 0–100.
| Value | Search expression | Range |
|---|---|---|
| Very dark | brightness:very-dark | 0 ≤ L < 25 |
| Dark | brightness:dark | 25 ≤ L < 40 |
| Medium | brightness:medium | 40 ≤ L < 70 |
| Light | brightness:light | 70 ≤ L < 95 |
| Very light | brightness:very-light | 95 ≤ L ≤ 100 |
Background Color
Background color uses OKLCH chroma C and hue h in degrees. Gray includes backgrounds with a slight tint. The other groups require C > 0.015.
| Value | Search expression | Range |
|---|---|---|
| Gray | bg:gray | C ≤ 0.015 |
| Red/Pink | bg:red-pink | 345 ≤ h < 360 or 0 ≤ h < 40 |
| Orange/Brown | bg:orange-brown | 40 ≤ h < 85 |
| Yellow | bg:yellow | 85 ≤ h < 115 |
| Green | bg:green | 115 ≤ h < 170 |
| Cyan | bg:cyan | 170 ≤ h < 230 |
| Blue | bg:blue | 230 ≤ h < 285 |
| Purple | bg:purple | 285 ≤ h < 345 |
Text Contrast
Text contrast uses the WCAG contrast ratio R between the normal foreground and background. These groups are for exploration, not accessibility ratings or an overall readability score.
| Value | Search expression | Range |
|---|---|---|
| Low | contrast:low | 1 ≤ R < 7 |
| Medium | contrast:medium | 7 ≤ R < 12 |
| High | contrast:high | 12 ≤ R ≤ 21 |
Background metrics are calculated from sRGB using Oklab. Contrast uses sRGB relative luminance. Classification uses unrounded values; Theme info shows the metrics for each theme.
Operations
From Explore / Compare:
| Keys | Action |
|---|---|
/ | Open Search |
f | Open Filters |
R | Reset all conditions to their defaults |
While editing:
| Keys | Action |
|---|---|
↑ / ↓ | Search: select a result |
Tab / Shift-Tab | Filters: select a field |
← / → | Filters: change a choice |
Enter | Apply the conditions |
See Keybindings for text editing and cancellation, and Favorites & Saved Filters to reuse conditions.
Theme Details
Use Theme info to inspect a theme's background and source, Color details to examine individual colors, and Copy to take its name or colors to another application.
Theme Info
Overview shows the theme name, registered appearance, foreground and background colors, background metrics, and text contrast. In Compare it shows Pin and Current together. See Search & Filters for the metrics and classification ranges.
Credits lists the theme's supplied source links. A credit may refer to a person or another source. Select a link to open it in your default browser.
Color Details
Color details lists foreground, background, the 16 ANSI colors, and optional cursor and selection colors, with color swatches and HEX values.
In Compare, Same and Diff indicate whether both RGB values match; Missing means at least one theme has no value for that role. Optional colors are left unspecified when absent from the theme.
Foreground and ANSI roles include a text sample on the theme's background and a contrast ratio. Background, cursor, and selection roles show their registered values without a contrast ratio. Actual cursor and selection rendering depends on your terminal.
Copy
Choose Current or Pin and one of two formats:
| Format | Content |
|---|---|
| Name | The theme name |
| JSON | A color object with lowercase HEX values |
JSON contains foreground, background, black through white, brightBlack through brightWhite, and optional cursor and selection values. Unspecified colors are omitted. This is a color export, not a terminal-specific configuration file.
Copy uses the system clipboard. See Compatibility for required commands.
Theme Sources
The bundled catalog comes from VHS. Its MIT license is included with Asinus, and the supplied credits are available in Theme info.
Operations
In Explore / Compare and detail panels:
| Keys | Action |
|---|---|
i | Open or close Theme info |
d | Open or close Color details |
Tab | Switch focus between themes and the detail panel |
↑ / ↓ | In a detail panel: scroll the overview, select a credit, or select a color role |
← / → | In Theme info: switch Overview / Credits |
t | In a single-theme detail view: switch Current / Pin |
Enter | In Credits: open the selected link |
y | Open Copy |
In Copy:
| Keys | Action |
|---|---|
t | Switch Current / Pin |
↑ / ↓ | Select Name / JSON |
Enter | Copy the selected format |
See Keybindings for all controls.
Favorites & Saved Filters
Favorites keep promising themes easy to find. Ignored themes are hidden from the default results. A theme can be either favorite or ignored; setting one replaces the other. Pin is a separate comparison reference.
Use the Favorite and Ignored fields in Filters, or search with favorite:true, ignore:all, or ignore:true to revisit marked themes.
Saved Filters
Save a set of conditions under a name to reuse it later. Saved filters store the query, so their results reflect your current favorites and ignored themes.
The built-in Initial entry restores the default conditions. Your own entries can be renamed or deleted. To replace a saved query, delete its entry and save the new conditions.
Favorites, ignored themes, and saved filters persist between runs. See Data Files for their storage locations.
Operations
In Explore / Compare, with theme selection focused:
| Keys | Action |
|---|---|
m | Toggle Favorite for the selected theme |
x | Toggle Ignored for the selected theme |
In Explore / Compare or a detail panel:
| Keys | Action |
|---|---|
S | Save the current conditions under a name |
s | Open Saved filters |
In Saved filters:
| Keys | Action |
|---|---|
↑ / ↓ | Select an entry |
Enter | Apply the selected conditions |
S | Save the current exploration's conditions |
e | Rename the selected entry |
D | Delete the selected entry, after confirmation |
See Keybindings for all controls.
Keybindings
Keys are case-sensitive: S means uppercase S. Press F1 for help with the actions available in the current screen.
Common
| Keys | Action |
|---|---|
Ctrl-C | Quit from any screen |
F1 | Open or close contextual help |
Esc | Close the current view, cancel editing, or leave Compare |
Navigation
In theme lists, detail panels, Saved filters, and Help:
| Keys | Action |
|---|---|
↑ / k | Select the previous item or scroll up |
↓ / j | Select the next item or scroll down |
Ctrl-B / Ctrl-F | Move backward / forward by a page |
g / G | Go to the beginning / end |
Explore / Compare
These controls also work from detail panels. Pin, Favorite, and Ignored require theme selection focus.
| Keys | Action |
|---|---|
p | Pin the selected theme, replace the pin, or unpin it if already pinned |
c | Toggle Compare; requires a pin |
v | Toggle side-by-side / stacked comparison |
z | Show or hide the theme list |
[ / ] | Select the previous / next preview sample |
P | Open the preview selector |
/ | Open Search |
f | Open Filters |
R | Reset conditions to their defaults |
m | Toggle Favorite |
x | Toggle Ignored |
S | Save the current conditions |
s | Open Saved filters |
i | Open or close Theme info |
d | Open or close Color details |
y | Open Copy |
q | Quit |
Detail Panels
Navigation acts on the focused panel's overview, credits, or color roles.
| Keys | Action |
|---|---|
Tab / Shift-Tab | Switch focus between themes and the detail panel |
← / h, → / l | Theme info: select Overview / Credits |
t | Switch Current / Pin when viewing a single theme |
Enter | Credits: open the selected link in the default browser |
Z | Toggle the detail panel's maximized layout |
Search / Filters
| Keys | Action |
|---|---|
↑ / ↓ | Search: select a result |
Ctrl-B / Ctrl-F | Browse results by page |
Tab / Shift-Tab | Filters: select the next / previous field |
← / h, → / l | Filters: change the selected choice |
Enter | Apply the conditions |
Text Editing
These keys apply to Search, the Name field in Filters, and Save / Rename dialogs. Character keys such as j, k, and q enter text in these fields.
| Keys | Action |
|---|---|
← / → | Move the cursor |
Ctrl-← / Alt-B | Move to the previous word |
Ctrl-→ / Alt-F | Move to the next word |
Home / End | Move to the start / end of the input |
Backspace / Delete | Delete before / after the cursor |
Ctrl-W / Alt-Backspace | Delete the previous word |
Ctrl-Delete / Alt-D | Delete the next word |
Ctrl-U | Clear the input |
Modified keys depend on terminal settings. See Compatibility.
Preview Selector
| Keys | Action |
|---|---|
Tab / Shift-Tab | Switch between Sample and Content for built-in samples |
← / h, → / l | Change the selected value |
Enter | Apply the settings |
Saved Filters
Use the common navigation keys to select an entry.
| Keys | Action |
|---|---|
Enter | Apply the selected conditions |
S | Save the current exploration's conditions |
e | Rename the selected entry |
D | Delete the selected entry |
In Save / Rename / Delete dialogs, Enter confirms the operation.
Copy
| Keys | Action |
|---|---|
↑ / k, ↓ / j | Select Name / JSON |
t | Switch Current / Pin |
Enter | Copy to the system clipboard |
Configuration
Use config.toml to customize the Asinus UI.
Configuration File Location
Asinus selects the configuration file in this order.
- The path set in
ASINUS_CONFIG_FILE. $XDG_CONFIG_HOME/asinus/config.tomlifXDG_CONFIG_HOMEis nonempty.$HOME/.config/asinus/config.toml.
Asinus reads only the selected file. Relative paths are resolved from the current working directory. If the selected default file is missing, Asinus uses its built-in settings.
An empty ASINUS_CONFIG_FILE, a missing file specified by that variable, or an unreadable or invalid configuration file prevents startup. Unknown settings are reported as errors.
Create a Configuration
Save the following example as config.toml in your current directory. It sets the colors of selected items and turns off reverse video.
[ui.style.selection]
fg = "#1e1e2e"
bg = "#89b4fa"
modifiers = []
Run Asinus with this file.
ASINUS_CONFIG_FILE=./config.toml asinus
All settings are optional. Add only the values you want to change.
UI Style
[ui.style] controls the application UI. Preview samples and color swatches use the colors of the theme being inspected.
Each setting below is a table under [ui.style]. Use fg for the foreground color and bg for the background color. When omitted, bg inherits from base, and fg uses the listed color or inherits from base.
| Setting | Default | Use |
|---|---|---|
base | "default" for both colors | Main text and background |
heading | Bold | Screen and panel headings |
focus | "cyan", bold | Active panels and controls |
selection | Reverse video | Selected rows and menu items |
key | "cyan", bold in Help | Shortcut keys in Help and footers |
muted | Base colors | Descriptions beside shortcut keys in footers |
condition_key | "green" | Keys in search conditions |
search_match | "yellow", bold | Matching text in theme names |
comparison_diff | "yellow" | Difference labels in Color details |
notice | "blue" | Informational notices |
success | "green" | Success notices |
warning | "yellow" | Warning notices |
error | "red", bold for search input errors | Error notices and search input errors |
Color values are strings. Use "default" for the terminal's default color or "#RRGGBB" for an RGB color. ANSI color names are black, red, green, yellow, blue, magenta, cyan, and white, plus their bright_ forms such as bright_cyan.
Styles other than base also accept a modifiers array with "bold", "dim", "underline", and "reverse". An explicit array replaces the default attributes, and [] clears them. Omit the array to keep the default attributes.
For editor validation, see the configuration schema.
Data Files
Asinus saves application data in two TOML files. For the settings file you edit, see Configuration.
| File | Contents | Path override |
|---|---|---|
marks.toml | Favorites and ignored themes | ASINUS_STATE_PATH |
workspace.toml | Saved filters, last applied conditions, built-in preview sample and content size, comparison direction | ASINUS_WORKSPACE_PATH |
Locations
The default directory is $XDG_DATA_HOME/asinus when XDG_DATA_HOME is an absolute path. Otherwise, Asinus uses $HOME/.local/share/asinus. This applies on both macOS and Linux.
Set either path override to choose a different file. Relative overrides are resolved from the current working directory:
ASINUS_STATE_PATH=./marks.toml \
ASINUS_WORKSPACE_PATH=./workspace.toml \
asinus
Read-Only Mode
If either file is invalid or cannot be read or locked at startup, Asinus reports the reason and opens in read-only mode. You can browse and change conditions for that session, but favorites, ignored themes, saved filters, and session settings cannot be saved.
Check the reported file and directory permissions, or close another Asinus instance using the same files, then restart.
Compatibility
Asinus targets macOS and Linux. Windows is not currently supported.
Terminal
Use a terminal with True Color (24-bit RGB) support and at least 60 columns × 22 rows. Larger windows give previews more room. Some panels fill the screen at smaller sizes, and preview content may be clipped.
The surrounding UI uses your terminal's colors by default. Preview samples use the selected theme's RGB colors. Text attributes such as bold and dim depend on terminal settings. To customize the UI, see Configuration.
Clipboard
Copy requires the following command on PATH:
| Environment | Command |
|---|---|
| macOS | pbcopy |
| Linux / Wayland | wl-copy |
| Linux / X11 | xclip |
Linux clipboard access uses WAYLAND_DISPLAY and DISPLAY to select the available commands. In a remote session, these commands run on the machine hosting Asinus.
Keyboard Input
Your terminal must forward F1 and modified key combinations to Asinus. If a key opens a terminal shortcut instead, adjust the terminal's key settings. See Keybindings for available alternatives.