Fine-tune light, shadows, borders, neumorphic
Light and shadows
Borders
Neumorphic

Colour engine

@prismora/color generates perceptually even 12-step scales in OKLCH, maps them into the sRGB gamut, and checks every text and boundary pair against WCAG 2.x. APCA is reported for information.

Scale roles

StepsUse
1–2App and subtle backgrounds
3–5Component backgrounds: normal, hover, active
6–8Borders: subtle, normal, strong (8 meets 3:1)
9–10Solid fills: normal, hover
11Low-contrast text (≥ 4.5:1)
12High-contrast text (≥ 7:1)

Generated from #7c5cff

Light

accent secondary neutral success warning danger info

Dark

accent secondary neutral success warning danger info

API

import { generatePalette, auditPalette, toHex, extractColors } from '@prismora/color'; const p = generatePalette({ seed: '#7c5cff', mode: 'dark', harmony: 'triadic' }); p.scales.accent[8]; // step 9 (OKLCH object) p.semantic['accent-on-solid']; auditPalette(p).filter((c) => !c.pass); // [] — guaranteed by the test-suite // Brand colours from a logo (ImageData.data) extractColors(imageData.data, { count: 5 })[0].color;

Why generated in JavaScript?

Browsers do not yet gamut-map relative colours, so deriving tints with oklch(from …) in CSS gives unpredictable results for vivid seeds. Prismora computes scales ahead of time (at build time or in the generator) with proper gamut mapping, and only uses color-mix(in oklab, …) at runtime for translucency.