Skip to content

Dark mode: separate text color for a view's brand, with contrast warnings #681

Open

Description

@n400

LLM-GENERATED TEXT

Follow-up to #680. In dark mode a view's primary color drives button fills, links, chart lines, and progress bars. One color can't pass contrast as both a primary button fill under white text (luminance 0.183 or less) and as small text on a dark card (0.256 or more), so any brand color fails one of the two.

To do

  1. MDH-UI: a primaryTextColor prop on Layout that sets --mdhui-color-primary-text (and so -mark) separately from the fill. When it isn't given, the brand drives everything as it does now.
  2. ViewBuilder: a picker for it in the view settings.
  3. ViewBuilder: warnings in the UI when a chosen color misses the contrast floor for the places it's used: 4.5:1 for white text on a fill and for text on the card, 3:1 for chart marks.

Activity

  1. self-assigned this
    on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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