Add missing success background and tint color tokens#43
Open
threepointone wants to merge 1 commit intomainfrom
Open
Add missing success background and tint color tokens#43threepointone wants to merge 1 commit intomainfrom
success background and tint color tokens#43threepointone wants to merge 1 commit intomainfrom
Conversation
Add missing `success` semantic tokens and mappings for parity with info/warning/danger. Includes: a changeset, new CSS variables (`--color-kumo-success`, `--color-kumo-success-tint`), update to `--text-color-kumo-success` dark value (use green-400 for better contrast), theme-generator config entries for kumo-success and kumo-success-tint, Figma generator/ parser mappings, and update Meter demo to use the `kumo-success` utility classes.
threepointone
commented
Feb 8, 2026
| kumo: { | ||
| light: "var(--color-green-500, oklch(72.3% 0.219 149.579))", | ||
| dark: "var(--color-green-500, oklch(72.3% 0.219 149.579))", | ||
| dark: "var(--color-green-400, oklch(79.2% 0.209 151.711))", |
Author
There was a problem hiding this comment.
please note this specific change, reasoning in the pr description
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #31
Summary
The
successsemantic color was incomplete compared toinfo,warning, anddanger. Only--text-color-kumo-successexisted -- there were no--color-kumo-successor--color-kumo-success-tinttokens, which meant Tailwind utilities likebg-kumo-success,border-kumo-success, andbg-kumo-success-tintdidn't resolve. Any success-state UI had to fall back to raw Tailwind green utilities, which don't respect the Kumo theme system.How this was built
This PR was authored with an AI agent (Claude) in Cursor. Here's the workflow:
"I'm working on this issue -- analyse this repository and recommend next steps" -- The agent explored
theme-kumo.css, the theme generator config,kumo-binding.css, the Figma plugin mappings, and searched for raw green color workarounds across the codebase. It identified the gap, mapped out the token pattern used by the other semantic colors, found the MeterDemo workaround usinggreen-500, and proposed concrete next steps."Let's plan it. I'd also like to handle dark mode" -- The agent produced a detailed plan covering the exact oklch values to use (derived from the Tailwind v4 default green palette), all files that needed updating, and the dark mode fix for the existing text token. I reviewed and approved the plan.
"Implement the plan" -- The agent executed each step: edited the theme generator config, ran
pnpm codegento regeneratetheme-kumo.css, updated the Figma plugin mappings, fixed the MeterDemo workaround, and created the changeset.What changed and why
Theme generator config (
packages/kumo/scripts/theme-generator/config.ts):kumo-success(background) token:green-500light /green-700dark -- follows the exact same shade pattern askumo-info(blue-500/700),kumo-warning(yellow-500/700), andkumo-danger(red-500/700).kumo-success-tinttoken:green-300light /green-900dark -- same pattern askumo-info-tint(blue-300/900),kumo-warning-tint(yellow-300/900),kumo-danger-tint(red-300/900).text-kumo-successdark mode: changed fromgreen-500togreen-400. The original used the same value for both light and dark, which was inconsistent with every other status text token (dangeruses red-500/400,warninguses yellow-800/400,linkuses blue-800/400). The lightergreen-400improves readability on dark backgrounds.Generated theme CSS (
packages/kumo/src/styles/theme-kumo.css):pnpm codegento include the new--color-kumo-successand--color-kumo-success-tintCSS custom properties withlight-dark().Figma plugin (
packages/kumo-figma/src/parsers/tailwind-to-figma.ts,packages/kumo-figma/src/generators/shared.ts):bg-kumo-success,bg-kumo-success-tint, andborder-kumo-successto the Tailwind-to-Figma color mapping so the Figma plugin can resolve these new tokens.successandsuccessTintto the sharedVAR_NAMESobject for use in generators.MeterDemo (
packages/kumo-docs-astro/src/components/demos/MeterDemo.tsx):from-green-500 via-green-500 to-green-500withfrom-kumo-success via-kumo-success to-kumo-success. This was a workaround for the missing token and is now the only raw green usage found in the codebase.Token parity (before/after)
--text-color-kumo-*--color-kumo-*--color-kumo-*-tintNotes to reviewers
info,warning, anddangertokens -- no design decisions were made outside of that precedent.theme-fedramp.css) does not currently override any status color tokens, so no changes were needed there. If FedRAMP needs custom success colors in the future, they can be added to thefedrampkey in the theme generator config.green-*classes for success states can be migrated tobg-kumo-success,border-kumo-success, orbg-kumo-success-tint.