theme-factory
Algorithmic generation of related Styles from one source Style. Produces new Styles that share brand and voice but differ in tone or density.
Recipes
- Light / Dark inversion: swap
bgandfg. Adjustsurfaceandsurface-2to keep contrast. Recomputefg-mutedandborderto be perceptually consistent. - Density: tighten or relax
spacing.scaleby a factor (0.8 for compact, 1.25 for relaxed). Adjust typographyscaleproportionally. - Accent rotation: keep all tokens, swap
accentandaccent-2for a complementary or analogous pair from the same hue family. - Editorial / Display: keep colors, swap
typography.display.familybetween a serif and a sans of similar weight.
Procedure
- Read the source Style:
claw style get <sourceId>. - Decide the recipe based on the user's intent.
- Build the variant Style by starting from the source and overlaying the recipe's deltas. Use:
claw style create "<Source name> · Dark" --from <sourceId> - Apply the deltas to STYLE.md.
- Render a preview using a Template the source already has examples in.
- Report: the new style id and the deltas applied.
Constraints
- Never change
brand.voice,brand.do_dont, orbrand.taglines. Identity is shared across variants. - Each variant is a new Style, not a mutation of the source.
- Mention exact contrast ratios when producing a light/dark variant so the user can verify accessibility.