Two theme brand colors
@slashclone/two-theme-brand-colors
Find brand colors that work in both light and dark mode: for each hue, the shade with the best WCAG contrast against all your light and dark backgrounds at once, so a logo or accent can keep one color in both themes. Prints a table and saves the results as JSON.
SkillContentv0.1.0 (latest)
- Activity
- New: be the first to try it
- Installs
- 0 installs
- Likes
- 0 likes
- Clones
- 0 clones
How this works
- It is a skill: written instructions Claude reads when your request matches what the skill is for. You do not call it by name; just ask for the task.
- While it works, it reads and changes files in the places it lists, nowhere else.
- It runs these commands on your computer: node scripts/two-theme-colors.mjs.
- Nothing runs until you choose to use it, and you can remove it any time.
SKILL.md
Two-theme brand colors
Goal: one color for the logo (or a key accent) that reads on every background the product uses, light and dark, instead of a different color per theme.
Steps
- Collect the backgrounds. Ask for, or read from the design tokens, every light background (page, cards) and every dark one. Use hex values like
#F0EAE1. - Pick the hues to try. Start from
examples/hues.csv(twelve greens) or write adata/hues.csvwithname,hue,saturationrows for the brand's color family. Hue is 0 to 360; saturation is 0 to 1. - Choose the target. Logos and icons need 3 to 1 against their background (WCAG non-text contrast). Text needs 4.5 to 1. A single color rarely reaches 4.5 on both very light and very dark grounds, so this is usually for marks, not text.
- Run it:
node scripts/two-theme-colors.mjs --light "#F0EAE1,#FBF8F3" --dark "#181512,#211D19" --hues examples/hues.csv --min 3For each hue it tries every lightness and keeps the shade whose worst contrast across all the backgrounds is highest. - Read the result. The table lists pass or fail, the hex, and the worst contrast.
out/brand-colors.jsonhas every pair. Show the passing colors on both backgrounds side by side so the person can choose by eye. - Keep text colors separate. If the chosen color is for the logo, leave link and button text on their own tested colors per theme.
Rules
- Never claim a color passes without running the script on the real backgrounds.
- Report the worst-case number, not the best one.
- If nothing passes, say so and suggest either a lower target for non-text use or a separate color per theme.
Files
- SKILL.md
- examples/hues.csv
- kit.json
- scripts/two-theme-colors.mjs
Did it work?
0worked for them0did not work
Sign in to say whether it worked for you.
Nobody has said yet. Tried it? Tell the next person.
