Skip to content

ROU-12877: Fix Badge and IconBadge color tokens - #1195

Merged
OS-giulianasilva merged 6 commits into
ROU-12714from
ROU-12877
Aug 4, 2026
Merged

ROU-12877: Fix Badge and IconBadge color tokens#1195
OS-giulianasilva merged 6 commits into
ROU-12714from
ROU-12877

Conversation

@OS-giulianasilva

Copy link
Copy Markdown
Contributor

This PR is for aligning the Badge and IconBadge color tokens with the Figma design spec.

What was happening

  • Badge light (IsLight=True) variants rendered neutral dark text instead of the per-family text colors defined in Figma
  • Extended palette base/lightest shades were bound to fixed-step primitives, diverging from the component bg tokens used by the design (e.g. orange base, pink base)
  • Warning/yellow base badges rendered white text over a light yellow background (contrast issue)
  • Neutral badges had inconsistent text colors (neutral-0 rendered primary-colored text, neutral-5 rendered white text over a light grey background) and no dedicated lightest spec
  • Badge secondary used a hardcoded hex background
  • IconBadge ring was 2px using the surface color token instead of the 1px border subtlest token
  • Duplicated background-primary-lightest rule in the badge partial

What was done

  • Bound the base and lightest shades of the extended palette map to component bg tokens (red to danger, green to success, blue to info, yellow to warning, cyan to aqua primitives, grape to purple primitives)
  • Badge lightest variants now use the per-family text tokens (text-danger, text-extended-pink, etc.)
  • Warning/yellow base badges now use the on-light text color
  • Neutral badges: 0-5 use bg-neutral-base with text-default, 6-10 use bg-neutral-bold with text-inverse; lightest mode: 0-5 use bg-neutral-subtle with text-subtle, 6-10 use bg-neutral-base with text-default
  • Transparent badges: base uses text-primary, lightest uses text-inverse
  • Replaced the hardcoded secondary hex with bg-neutral-bold-default and text-subtle tokens
  • IconBadge ring reduced to 1px and defaulted to the border-subtlest token
  • Removed the duplicated background-primary-lightest rule and recorded decision D28 in the specs plan

Test Steps

  1. Run the dev server for one of the platforms
  2. Place Badge patterns with each Color value (semantic, neutral and extended palette) with IsLight set to False and True
  3. Verify backgrounds and text colors match the Badge component page in the Figma file
  4. Place an IconBadge over a colored surface and verify the 1px ring color

Screenshots

(prefer animated gif)

Checklist

  • tested locally
  • documented the code
  • clean all warnings and errors of eslint
  • requires changes in OutSystems (if so, provide a module with changes)
  • requires new sample page in OutSystems (if so, provide a module with changes)

@OS-giulianasilva
OS-giulianasilva requested a review from a team as a code owner August 3, 2026 17:12
Comment thread src/scss/04-patterns/05-numbers/_icon-badge.scss Outdated
Comment thread src/scss/05-useful/_colors-brand.scss Outdated
Comment thread src/scss/05-useful/_colors-brand.scss Outdated
Comment thread src/scss/05-useful/_colors-brand.scss Outdated
Comment thread src/scss/05-useful/_colors-brand.scss Outdated
OS-giulianasilva and others added 5 commits August 4, 2026 09:23
@sonarqubecloud

sonarqubecloud Bot commented Aug 4, 2026

Copy link
Copy Markdown

@OS-giulianasilva
OS-giulianasilva merged commit 7e44bb6 into ROU-12714 Aug 4, 2026
9 checks passed
@OS-giulianasilva
OS-giulianasilva deleted the ROU-12877 branch August 4, 2026 09:25
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