██████╗ █████╗ ███╗ ██╗██╗ ██╗ ██╗ ██████╗ ██╔══██╗██╔══██╗████╗ ██║██║ ██╔╝███║██╔════╝ ██║ ██║███████║██╔██╗ ██║█████╔╝ ╚██║███████╗ ██║ ██║██╔══██║██║╚██╗██║██╔═██╗ ██║██╔═══██╗ ██████╔╝██║ ██║██║ ╚████║██║ ██╗ ██║╚██████╔╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═╝ ╚═════╝
The dms dank16 command generates complete Base16 color palettes from a single input color. It creates harmonious 16-color terminal themes with proper contrast ratios for both light and dark modes.
Dank16 takes a single hex color and generates a full Base16-compatible palette suitable for terminals, editors, and other applications. The algorithm intelligently derives complementary colors while ensuring all colors meet contrast requirements for readability.
Key Features:

Generate a dark theme palette:
dms dank16 "#8b5cf6"
Output:
palette = 0=#1a1a1a
palette = 1=#e25443
palette = 2=#6ed675
palette = 3=#dbd97b
palette = 4=#9a65fd
palette = 5=#9173d2
palette = 6=#9565ff
palette = 7=#abb2bf
palette = 8=#5c6370
palette = 9=#e06a5f
palette = 10=#86e08b
palette = 11=#e8e697
palette = 12=#e5c7ff
palette = 13=#8269d9
palette = 14=#9069c0
palette = 15=#ffffff
Generate a light theme palette:
dms dank16 "#8b5cf6" --light
The generated palette follows the standard Base16 specification:
The default output is a simple palette format:
dms dank16 "#8b5cf6"
dms dank16 "#8b5cf6" --kitty
Output:
color0 #1a1a1a
color1 #e25443
color2 #6ed675
color3 #dbd97b
...
Copy the output directly to your ~/.config/kitty/kitty.conf.
dms dank16 "#8b5cf6" --foot
Generates color configuration for the Foot terminal emulator.
dms dank16 "#8b5cf6" --alacritty
Generates YAML configuration for Alacritty's color scheme.
dms dank16 "#8b5cf6" --ghostty
Generates configuration for the Ghostty terminal emulator.
dms dank16 "#8b5cf6" --json
Outputs the palette as a JSON object with detailed color information.
dms dank16 "#8b5cf6" --variants [--light] [--background <color>]
Outputs all color variants in a single call:
{
"color0": {
"dark": { "hex": "#1a1a1a", "hex_stripped": "1a1a1a" },
"light": { "hex": "#f8f8f8", "hex_stripped": "f8f8f8" },
"default": { "hex": "#1a1a1a", "hex_stripped": "1a1a1a" }
},
...
}
darklightdefault--light flag to determine which variant)Use --primary-dark and --primary-light to specify different primary colors for each mode:
dms dank16 --variants --primary-dark "#8b5cf6" --primary-light "#6d28d9"
This is the format injected into matugen templates as the dank16 object.
Dank16 supports two contrast algorithms to ensure readability:
The default algorithm uses Delta Phi Star contrast, which provides perceptually uniform contrast based on the golden ratio (phi). This algorithm:
dms dank16 "#8b5cf6" --contrast dps
How it works:
Lc = (|Lb^φ - Lf^φ|)^(1/φ) × 1.414 - 40Uses the standard WCAG 2.1 contrast ratio algorithm:
dms dank16 "#8b5cf6" --contrast wcag
Specify a custom background color instead of the default:
# Dark theme with custom background
dms dank16 "#8b5cf6" --background "#0d1117"
# Light theme with custom background
dms dank16 "#8b5cf6" --light --background "#ffffff"
All options can be combined:
dms dank16 "#8b5cf6" \
--light \
--background "#fafafa" \
--contrast wcag \
--kitty > ~/.config/kitty/dank-light.conf
The palette generation process follows these steps:
Container Derivation: Derives a container color from the input by adjusting saturation and value based on theme mode
Color Generation: Creates the core palette colors:
Contrast Enforcement: Each color is adjusted to meet minimum contrast requirements:
Bright Variants: Generates brighter versions for colors 9-14:
Generate consistent color schemes for your terminal:
# Kitty
dms dank16 "#your-color" --kitty >> ~/.config/kitty/kitty.conf
# Foot
dms dank16 "#your-color" --foot >> ~/.config/foot/foot.ini
# Alacritty
dms dank16 "#your-color" --alacritty >> ~/.config/alacritty/alacritty.yml
VSCode and other editors get their terminal colors automatically through DMS's built-in theming. The dank16 palette is also available in your custom matugen templates via the dank16 object—see the Application Theming docs for details.
Generate themes based on wallpaper colors or system accents:
#!/bin/bash
# Extract dominant color from wallpaper
dominant_color=$(your-color-extraction-tool ~/wallpaper.jpg)
# Generate and apply terminal theme
dms dank16 "$dominant_color" --kitty > ~/.config/kitty/auto-theme.conf
kitty @ set-colors -a ~/.config/kitty/auto-theme.conf
Create matching light and dark variants:
#!/bin/bash
COLOR="#8b5cf6"
# Generate both variants
dms dank16 "$COLOR" --kitty > ~/.config/kitty/dank-dark.conf
dms dank16 "$COLOR" --light --kitty > ~/.config/kitty/dank-light.conf
# Switch based on time or system setting
if is_dark_mode; then
kitty @ set-colors -a ~/.config/kitty/dank-dark.conf
else
kitty @ set-colors -a ~/.config/kitty/dank-light.conf
fi
Choose an input color that you want to be prominent in your terminal. The input color will be most directly represented as the blue/cyan colors (palette indices 4, 6, 12, 14) in the output, with other colors derived as complementary hues. True red, green, and yellow will still be represented in the appropriate position.
After generating a palette, test it with actual terminal applications:
# Generate palette
dms dank16 "#8b5cf6" --kitty > /tmp/test-theme.conf
# Open new kitty window with theme
kitty -o include=/tmp/test-theme.conf
Try slight variations of your input color to find the perfect palette:
# Try different shades
dms dank16 "#8b5cf6" # Original
dms dank16 "#9b6cf6" # Slightly lighter
dms dank16 "#7b4ce6" # Slightly darker
dms dank16 <hex_color> [flags]
Arguments:
hex_color (required): Input color in hex format (e.g., "#8b5cf6" or "8b5cf6")Flags:
--light: Generate light theme variant (default: dark)--background <hex>: Custom background color--contrast <algorithm>: Contrast algorithm - "dps" or "wcag" (default: "dps")--kitty: Output in Kitty terminal format--foot: Output in Foot terminal format--alacritty: Output in Alacritty terminal format--ghostty: Output in Ghostty terminal format--json: Output as JSON object with hex, hex_stripped, and RGB values--variants: Output all variants (dark/light/default) as JSON--primary-dark <hex>: Primary color for dark mode (use with --variants)--primary-light <hex>: Primary color for light mode (use with --variants)--wezterm: Output in Wezterm terminal format-h, --help: Show help