Skip to content

refactor: replace 1347 hardcoded hex with semantic Tailwind classes#450

Open
itskai-dev wants to merge 1 commit into
mainfrom
link/foragents-hex-cleanup
Open

refactor: replace 1347 hardcoded hex with semantic Tailwind classes#450
itskai-dev wants to merge 1 commit into
mainfrom
link/foragents-hex-cleanup

Conversation

@itskai-dev
Copy link
Copy Markdown
Collaborator

Task

task-1771427753854-uhywf9ps8 — forAgents.dev A-class hex cleanup

What

Replaced all 1347 hardcoded arbitrary Tailwind hex values (bg-[#hex], text-[#hex], border-[#hex]) across 175 files with semantic Tailwind classes that reference the existing CSS variables in globals.css.

Mapping

Hex Semantic Class
#06D6A0 primary
#F8FAFC / #E2E8F0 foreground
#0a0a0a / #0f0f0f / #0A0E17 / #111 background
#141414 / #0D1322 card
#1A1F2E / #1a1a1a secondary
#F59E0B solar
#8B5CF6 purple
#3B82F6 electric-blue
#EC4899 destructive

B-class Exceptions (6 instances, documented)

Third-party brand colors that correctly stay hardcoded:

  • #5865F2 — Discord blurple
  • #1DA1F2 — Twitter blue
  • #3178c6 — TypeScript
  • #f7df1e — JavaScript

Verification

grep -rn 'bg-\[#\|text-\[#\|border-\[#' src/app/ --include='*.tsx' --include='*.ts' | wc -l
# Result: 6 (all B-class exceptions)

Done Criteria

  • All bg-[#hex] arbitrary values replaced with token classes
  • All text-[#hex] arbitrary values replaced with token classes
  • All border-[#hex] arbitrary values replaced with token classes
  • Zero A-class brand hex in src/ pages (verified by scan)
  • B-class exceptions documented in allowlist

Migrated all A-class arbitrary hex values (bg-[#hex], text-[#hex], border-[#hex])
to semantic Tailwind classes referencing existing CSS variables in globals.css.

Mapping:
- #06D6A0 (primary brand) → text/bg/border-primary
- #F8FAFC/#E2E8F0 (text) → text-foreground
- #0a0a0a/#0f0f0f/#0A0E17/#111 (dark bg) → bg-background
- #141414/#0D1322 → bg-card
- #1A1F2E/#1a1a1a → bg-secondary
- #F59E0B → solar, #8B5CF6 → purple, #3B82F6 → electric-blue
- #EC4899 → destructive
- Various one-off colors consolidated to nearest semantic token

B-class exceptions (6 instances, documented):
- #5865F2 (Discord), #1DA1F2 (Twitter), #3178c6 (TypeScript), #f7df1e (JavaScript)
These are third-party brand colors that correctly stay hardcoded.

175 files changed, 1347 insertions(+), 1347 deletions(-)
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agent-hub Ready Ready Preview, Comment Feb 18, 2026 4:04pm

Request Review

@supabase
Copy link
Copy Markdown

supabase Bot commented Feb 18, 2026

This pull request has been ignored for the connected project oldbapagtyvkplbqllwa because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

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.

1 participant