1.4 KiB
1.4 KiB
Tasks: colours
- Create OpenSpec change folder with proposal, tasks, spec delta
- Scaffold package: package.json, tsconfig, vitest config, vite config, README
- Implement error-codes (
COLOUR_CODESviadefineCodes) - Implement errors (
ColourError extends SuaveplanErrorwith typed factories) - Implement colour-types (Zod schemas for RGBA, HSLA, LAB, LCH, OKLAB, OKLCH, CMYK, ColourInput)
- Implement utils (clamp, roundChannel, roundPercent, roundAlpha, isFiniteNumber)
- Implement parser (hex, rgb/rgba, hsl/hsla, lab, lch, oklab, oklch, named colour parsing)
- Implement conversions (rgb↔hsl, rgb↔hsv, rgb↔xyz, xyz↔lab, lab↔lch, rgb↔oklab, oklab↔oklch, rgb↔cmyk)
- Implement Colour class (chainable manipulation, analysis, output formatters)
- Implement colour-factories (random, fromTemperature, blend, steps, palette)
- Write tests for all modules (100% istanbul coverage target)
- Write co-located .md docs for every feature module
- Run lint, typecheck, test, build, coverage gates
- Plugin:
@suaveplan/colour-convert-hsluv— HSLuv/HPLuv conversions and harmonies - Plugin:
@suaveplan/colour-convert-cieluv— CIELUV, xyY, LMS, Bradford adaptation - Plugin:
@suaveplan/colour-filter-cmc— CMC l:c Delta-E distance - Plugin:
@suaveplan/colour-filter-cct— Correlated Colour Temperature - Fold spec delta into
openspec/specs/colours/spec.mdand archive