Skip to main content
Jeden Skill in Manus ausführen
mit einem Klick

replace-hardcoded-colors

Sterne19
Forks24
Aktualisiert9. Februar 2026 um 04:31

Finds hardcoded color values (hex, rgb, rgba) in a specified directory, a single file, or multiple files and replaces them with theme variables from apps/storybook/src/tailwind/customTheme.ts. Prefers Tailwind class names (oui-*) from packages/ui/tailwind.config.js when the context allows; otherwise uses CSS variables (e.g. rgb(var(--oui-color-primary)) or rgba with alpha). When the original was rgba, keep the comma syntax: rgba(var(--oui-color-*), alpha); do not convert to slash syntax. When code already uses rgb(var(--oui-*)/α) or rgb(var(--oui-*)_/_α), do not convert to rgba(var(--oui-*), α). When no exact match exists, uses the closest theme color by semantics or RGB distance. Use when the user asks to find or replace hardcoded colors in a directory/file(s), or to align colors with customTheme.

Installation

Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.

Datei-Explorer
2 Dateien
SKILL.md
readonly