Skip to content

Style: Theme Color Inconsistency #519

@dev-rohitkumar

Description

@dev-rohitkumar

✨ Current Style Issue

  • Problem: When user changes theme color (red/blue/teal/etc.), many accent elements still use hardcoded purple classes (text-purple-*, bg-purple-*, border-purple-*), causing mixed colors and inconsistent theming.

💡 Proposed Style Changes

  • Suggested Change: Make all non-semantic accent styles derive from the active theme color (primary) instead of hardcoded purple.
  • Technical Notes:
    • Replace: text|bg|border-purple-XXXtext|bg|border-primary-XXX
    • Ensure primary shade CSS vars (--color-primary-50 … 950) are generated (ThemeContext handles this).
    • Update gradients using purple to use from-primary-400 via-primary-500 to-primary-600 (or mark them brand-fixed).
    • Convert inline purple hex / focus / ring usages to primary equivalents.
    • Optional: add ::selection { background: var(--color-primary-500); color:#fff; }
  • Example:
    • Before: <span className="text-purple-600 dark:text-purple-400">Fundamentals</span>
    • After: <span className="text-primary-600 dark:text-primary-400">Fundamentals</span>

🔍 Alternatives Considered

  • Keep purple as fixed brand accent and only theme internal content (rejected: still inconsistent).
  • Add second token (brand vs user accent) (rejected for now: adds complexity).
  • Leave only base --color-primary without shades (rejected: limits existing Tailwind usage).

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions