openpencil/openspec/specs/shared-color-utils/spec.md
Anton Soldatov 168c25c189
feat: mobile layout, PWA support (#27) (#27)
- Mobile-responsive editor with bottom drawer, ribbon nav, HUD overlay
- Touch support: single-finger tools, two-finger pinch-zoom
- PWA: manifest, service worker, installability
- Extract LayerTree from LayersPanel, shared utils (colorToCSS, initials, toolIcons)
- Constants moved to src/constants.ts, clipboard state to editor store
- reka-ui Popover/DropdownMenu in MobileHud

Co-authored-by: Danila Poyarkov <dev@dannote.net>
2026-03-05 19:51:51 +03:00

635 B

ADDED Requirements

Requirement: colorToCSS exported from core

The colorToCSS function SHALL be exported from packages/core/src/color.ts and compose with the existing colorToRgba255 helper. It SHALL convert a Color value to a CSS rgb(r, g, b) string.

Scenario: Converts color to CSS string

  • WHEN colorToCSS({ r: 0.96, g: 0.26, b: 0.21, a: 1 }) is called
  • THEN it returns "rgb(245, 66, 54)"

Scenario: Available as named import from core

  • WHEN consumer writes import { colorToCSS } from '@open-pencil/core'
  • THEN the import resolves without error and the function works as expected