#Understanding colors.toml

19 messages · Page 1 of 1 (latest)

bronze jetty
#

This post exists to be a place to collect and compile info on colors.toml and provide a resource for what it does and how it uses the colors, etc.


colors.toml in Omarchy (What it does)

  • colors.toml is the palette source Omarchy uses to auto-generate themed configs.
  • If a theme includes its own file (like kitty.conf or waybar.css), that file wins and template generation is skipped
    for that app.
  • If a file is missing, Omarchy renders it from templates using the values in colors.toml.

Omarchy will generate basic versions of:
alacritty.toml, btop.theme, chromium.theme, ghostty.conf, hyprland.conf,
hyprlock.conf, kitty.conf, mako.ini, obsidian.css, swayosd.css,
walker.css, waybar.css

Template system quick notes

  • Templates live in ~/.local/share/omarchy/default/themed/*.tpl.
  • You can override them with your own in ~/.config/omarchy/themed/*.tpl.
  • Placeholders support:
    • {{ key }} (raw hex, e.g. #1a1b26)
    • {{ key_strip }} (hex without #)
    • {{ key_rgb }} (e.g. 26,27,38)

colors.toml template (commented)

  accent = "#7AA2F7"              # Omarchy UI accent: links, focused controls, active states
  cursor = "#C0CAF5"              # Cursor color in terminal templates
  foreground = "#C0CAF5"          # Primary text color used across Omarchy templates
  background = "#1A1B26"          # Default background for terminals and themed UI surfaces

  selection_foreground = "#C0CAF5" # Text color for selections
  selection_background = "#283457" # Selection background used in terminal templates

  # Base16-aligned 16-color palette.
  # Omarchy templates map these to terminal color0-15 and Base16 base00-base0F.
  color0  = "#15161E"  # base00 - Deep background; primary canvas for terminals
  color1  = "#F7768E"  # base08 - Error/critical accents
  color2  = "#9ECE6A"  # base0B - Success/positive accents
  color3  = "#E0AF68"  # base0A - Warning/attention accents
  color4  = "#7AA2F7"  # base0D - Primary accent (links, active, emphasis)
  color5  = "#BB9AF7"  # base0E - Secondary accent (special highlights)
  color6  = "#7DCFFF"  # base0C - Informational accents
  color7  = "#A9B1D6"  # base05 - Default foreground for terminal text

  color8  = "#414868"  # base03 - Dim text, inactive UI, subtle borders
  color9  = "#F7768E"  # base08 - Bright/error variant
  color10 = "#9ECE6A"  # base0B - Bright/success variant
  color11 = "#E0AF68"  # base0A - Bright/warning variant
  color12 = "#7AA2F7"  # base0D - Bright primary accent variant
  color13 = "#BB9AF7"  # base0E - Bright secondary accent variant
  color14 = "#7DCFFF"  # base0C - Bright informational accent variant
  color15 = "#C0CAF5"  # base07 - Highest-contrast text

A little support goes a long way! If you’d like to help me keep creating, you can do so at https://ko-fi.com/oldjobobo

shut dagger
#

tyy

bronze jetty
#

Added a short into blurb. Please post useful info you discover on colors.toml

split wedge
#

As much as I like the idea of trying to understand the colors and where they are used, it really just falls on the software developer or theme creator responsible for creating a theme for said software. There may be a few general rules to follow (like foregrounds, backgrounds, success, error, etc) but there is never really going to be a perfect "understanding" of how the colors are used.

bronze jetty
split wedge
#

Guess I misunderstood; I never really saw it as "Omarchy" using those colors for it's apps or setups.

bronze jetty
#

Granted you can ignore colors.toml for now if you like and just override it with config files as normal but colors.toml does 75% of the config if you are only concerned with colors, for things you want to do more then colors then it makes sense to override and make a full config file.

#

This post, thread, whatever is meant to be for those that want to know more about what colors.toml does and how to work with it better. Especially for those new to theme creation this makes starting a basic theme from scratch much simpler.

bronze jetty
#

Added the list of files generated by Omarchy using colors.toml

bronze jetty
#

Where the colors go (default Omarchy templates)

This section is based on the default ~/.local/share/omarchy/default/themed/*.tpl files.

  • Alacritty (alacritty.toml)
    • colors.primary: background, foreground
    • colors.cursor: text = background, cursor = cursor
    • colors.selection: selection_foreground, selection_background
    • colors.normal: color0–color7
    • colors.bright: color8–color15
    • Search/focused match uses color3 and color1
  • Kitty (kitty.conf)
    • foreground, background
    • selection_foreground, selection_background
    • cursor and cursor_text_color (text = background)
    • active_border_color, active_tab_background = accent
    • color0–color15
  • Ghostty (ghostty.conf)
    • background, foreground, cursor-color
    • selection_background, selection_foreground
    • palette = 0..15 uses color0–color15
  • Hyprland (hyprland.conf)
    • Active border color uses accent (accent_strip in rgb(...))
    • Only touches active border in the default template
  • Hyprlock (hyprlock.conf)
    • Background: background_rgb
    • Foreground/text: foreground_rgb
    • Accent/check: accent_rgb
    • Used in rgba(...) fields for the lockscreen
  • Mako (mako.ini)
    • text-color = foreground
    • border-color = accent
    • background-color = background
  • Waybar (waybar.css)
    • @define-color foreground = foreground
    • @define-color background = background
  • SwayOSD (swayosd.css)
    • background-color = background
    • border-color = foreground
    • label, image = foreground
    • progress = accent
  • Walker (walker.css)
    • selected-text = accent
    • text, foreground = foreground
    • base, background = background
    • border = foreground
  • Obsidian (obsidian.css)
    • Core surfaces: background
    • Body text: foreground
    • Selection: selection_background
    • Borders/muted: color8
    • Headings: color1–color5
    • Links/accents: color4 + accent
    • Code: color6
    • Errors/success: color1 / color2
    • Graph elements: accent, color4, color6, color2
  • btop (btop.theme)
    • Base UI: main_bg = background, main_fg = foreground
    • Highlights: hi_fg = accent, title = foreground
    • Selections: selected_bg = color8, selected_fg = accent
    • Inactive/meter/dividers: inactive_fg = color8, meter_bg = color8, div_line = color8
    • Box outlines: cpu_box = color5, mem_box = color2, net_box = color1, proc_box = accent
    • Graph gradients:
      • Temp: color2 → color3 → color1
      • CPU: color6 → color4 → color5
      • Free: color5 → color4 → color6
      • Cached: color4 → color6 → color5
      • Available: color3 → color1 → color1
      • Used: color2 → color6 → color4
      • Download: color3 → color1 → color1
      • Upload: color2 → color6 → color4
  • Chromium (chromium.theme)
    • Single RGB line from background_rgb

smoky shoal
#

Scripts responsible of omarchy theming
located in (~/.local/share/omarchy/bin)

  • omarchy-theme-bg-install
    • Creates and open user backgrounds directory for the current theme
  • omarchy-theme-bg-next
    • Cycle through the theme's background
  • omarchy-theme-current
    • Echoes the current theme name
  • omarchy-theme-install
    • git clone a remote theme in ~/.config/omarchy/themes
  • omarchy-theme-list
    • Lists available themes
  • omarchy-theme-remove
    • Remove a theme from ~/.config/omarchy/themes
  • omarchy-theme-set
    • Applies an omarchy theme
  • omarchy-theme-set-templates
    • Parse color.toml and generates themes files based on templates
  • omarchy-theme-set-(browser/gnome/obsidian/vscode)
    • Migrate apps theme
  • omarchy-theme-update
    • git pull on every theme repo

Note:
"omarchy-theme-set-templates" dropped it's dependency on yq.
No change of behavior but this should fix parsing issues we have seen these days
for those lacking yq on their system or using yq_go
https://github.com/basecamp/omarchy/commit/febd18ce846c0605126a6ebc3efb0682db2731e8

GitHub
  • Replace yq with pure bash for TOML parsing

The yq-based parsing only worked with jq/yq v3 and broke with go-yq v4.
This change removes the yq and uses bash for parsing. Some additional improvme...

noble valley
bronze jetty
noble valley
#

I still have no idea if or how I can dynamically reference the colors.toml colors from another config file though. For example can I use "color8" in my theme's hyprland.conf file or do I still have to use a raw hex code?

bronze jetty
#

yeah no, colors.toml does not do that. its not a crossreference in that way

#

at least as implemented

#

if you look up at the first message I also updated that with a bunch of my data on how it works.