Skip to content

refactor(theme): extract canonical risk colors to shared tokens module - #2043

Open
ravimahatonp wants to merge 1 commit into
Commitlabs-Org:masterfrom
ravimahatonp:refactor-risk-type-colors
Open

ravimahatonp wants to merge 1 commit into
Commitlabs-Org:masterfrom
ravimahatonp:refactor-risk-type-colors

Conversation

@ravimahatonp

Copy link
Copy Markdown

Summary

Closes #1900

Extracts the canonical risk-type color hex codes into a centralized tokens module (src/constants/riskColors.ts) and refactors MarketplaceCard.tsx to consume the shared palette instead of maintaining hardcoded literals.

Changes

  • Created src/constants/riskColors.ts defining RISK_COLORS and RISK_COLOR_CLASSES for Safe (#00C950), Balanced (#51A2FF), and Aggressive (#FF8904).
  • Updated MarketplaceCard.tsx to use RISK_COLOR_CLASSES.

- Define RISK_COLORS and RISK_COLOR_CLASSES in src/constants/riskColors.ts
- Refactor MarketplaceCard.tsx to consume centralized tokens
- Eliminate hardcoded hex magic literals for Safe, Balanced, and Aggressive states

Closes Commitlabs-Org#1900
@vercel

vercel Bot commented Oct 2, 2026

Copy link
Copy Markdown

@ravimahatonp is attempting to deploy a commit to the 1nonly's projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

Risk-type color hex codes duplicated as magic literals across many components

1 participant