Skip to content

Omarchy themes: colours written as 0x1d1f21 in a theme's alacritty.toml are ignored, so the theme shows no colours #798

Closed

Description

@nixfred

What happens

parseThemeColors() in omarchyd/omarchy-theme.mjs (line 22-45) reads a theme's colors.toml, or its alacritty.toml for older themes, and only accepts #rrggbb (or bare rrggbb) values:

new RegExp(`^\\s*${key}\\s*=\\s*["']?(#?[0-9a-fA-F]{6})["']?`, 'm')

Alacritty accepts colours written as "#rrggbb" or "0xrrggbb", and Alacritty themes written with the 0x form exist. For such a file the regex sees 0 followed by x, which is not a hex digit, so no colour is found: background, foreground, accent, the dots and the palette come back empty. The theme list then shows that theme without its swatches and the app's own colours do not follow it.

How to reproduce

Call parseThemeColors() with an Alacritty theme in the 0x style:

[colors.primary]
background = '0x1d1f21'
foreground = '0xc5c8c6'
[colors.normal]
blue = '0x81a2be'

Actual: {"background":null,"foreground":null,"accent":null,"dots":[]}
Expected: background #1d1f21, foreground #c5c8c6, accent #81a2be and one dot, as the same file written with # gives.

Suggested fix

Accept an optional 0x prefix in place of # in the pattern and normalise it to #rrggbb.

Environment

Omarchy Server main (9e1bd67, 0.9.53), Node 26.

Activity

  1. calledtoconstruct commented on Nov 22, 2026

    @calledtoconstruct
    Collaborator

    Working to resolve this.

    No open pull request references this issue, and no one has commented that they are working on it.

    #163, #653, #472, #797, #204, #205, #206, #207, #654, #806, #264, #258, #238, and #360 share storage, setup, and new machines with this and will land in one pull request.

    🤖 Generated with Grok 4.7

  2. calledtoconstruct commented on Nov 22, 2026

    @calledtoconstruct
    Collaborator

    Thanks @nixfred. Theme colours written as 0x1d1f21 are read. This ships in #879.

    🤖 Generated with Grok 4.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions