From df6921985987745b9dc6b97ccd208b798d5edfde Mon Sep 17 00:00:00 2001
From: Danny White <3104761+dnywh@users.noreply.github.com>
Date: Thu, 16 Jul 2026 00:09:22 +1000
Subject: [PATCH] fix(ui): restore success and warning badge contrast (#47828)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## What kind of change does this PR introduce?
Bug fix
## What is the current behavior?
After the colour system migration, `Badge` success and warning variants
use semantic `text-brand` / `text-warning` (and soft `border-brand` /
`border-warning` tokens). In light mode those fills sit around mid–high
lightness, so the badges look flat and the text is hard to read.
Call sites that never migrated — e.g. Compute badges (`SMALL`) and table
constraint tokens (`PRIMARY`) — still use the darker scale tokens and
look fine.
## What is the new behavior?
Success and warning badges again use the darker scale tokens, matching
those working call sites:
- success: `text-brand-600` + `border-brand-500`
- warning: `text-warning-600` + `border-warning-500`
| Before | After |
| --- | --- |
|
|
|
## To test
On the staging preview in **light mode**:
- Any `Badge variant="success"` — e.g. “New”, “Enabled”, “Healthy”,
branch badges
- Any `Badge variant="warning"` — e.g. beta / warning status badges
- Compare with Compute size badges and Database → Tables → Columns →
Constraints (`PRIMARY`) — contrast should now feel similar
Spot-check **dark mode** to confirm badges still look correct.
## Summary by CodeRabbit
* **Style**
* Updated warning and success badges with refined text and border colors
for improved visual consistency.
---
packages/ui/src/components/shadcn/ui/badge.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/packages/ui/src/components/shadcn/ui/badge.tsx b/packages/ui/src/components/shadcn/ui/badge.tsx
index b5276b0bdee..e20c873c222 100644
--- a/packages/ui/src/components/shadcn/ui/badge.tsx
+++ b/packages/ui/src/components/shadcn/ui/badge.tsx
@@ -9,8 +9,8 @@ const badgeVariants = cva(
variants: {
variant: {
default: 'bg-surface-75 text-foreground-light border border-strong',
- warning: 'bg-warning/10 text-warning border border-border-warning',
- success: 'bg-brand/10 text-brand border border-border-brand',
+ warning: 'bg-warning/10 text-warning-600 border border-warning-500',
+ success: 'bg-brand/10 text-brand-600 border border-brand-500',
destructive: 'bg-destructive/10 text-destructive border border-border-destructive',
// Secondary is invisible
secondary: