Skip to content

fix(theme): align badge color tokens with the Luma design system - #214

Merged
linuspahl merged 3 commits into
mainfrom
issue-43/badge-colors
Aug 27, 2026
Merged

linuspahl merged 3 commits into
mainfrom
issue-43/badge-colors

Conversation

@laura-b-g

@laura-b-g laura-b-g commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Description

Aligns the theme's badge color tokens (theme.colors.badges) with the current design system spec. Renames the color keys to the same semantic names used everywhere else in the theme (primary/danger/success/warning/gray), fixes the light-variant opacity for primary (it previously rendered as a solid fill instead of tinted), adds a badge-scoped accent color for warning matching the current spec, and fixes an inverted background/text pairing on gray's filled variant. Also removes the now-unused per-color dot.color field — dot indicators derive their color from the badge's own text color at the consuming component instead.

Motivation and Context

These tokens existed in the theme already but had drifted from the current design spec and weren't consumed by any component yet. A companion PR in graylog2-server (see /prd below) introduces the Badge component that reads them.

How can this be tested?

Areas to test: theme.colors.badges.<color>.<light|filled>.{background,text} for all five colors, in both light and dark mode.

Setup: yarn install && yarn test — the styled-components theme snapshot test covers the full color output.

Happy path: primary/danger/success/warning/gray each resolve a correct background/text pair for both the light and filled variant.

Edge cases: primary/danger still differ between light/dark mode (their base color shades do); success/warning/gray are intentionally mode-agnostic, matching their existing behavior.

/prd Graylog2/graylog2-server#27038

BADGE_WARNING_ACCENT (#FFA800) diverged from theme.colors.variant.warning
and theme.colors.alerts.warning, making the warning badge inconsistent
with adjacent warning surfaces. The Figma badge references the design
system's Yellow/5 token, i.e. the same slot as warning[5], so read from
the ramp like every other badge color.
@laura-b-g
laura-b-g marked this pull request as ready for review August 25, 2026 14:55

@linuspahl linuspahl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@linuspahl
linuspahl merged commit 41293eb into main Aug 27, 2026
2 checks passed
@linuspahl
linuspahl deleted the issue-43/badge-colors branch August 27, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants