@pbroom/color-kit/driverColor state

ColorDisplayStyles

Inline style pair for a color swatch. Set both properties: browsers that do not understand color(display-p3 ...) drop background and keep backgroundColor.

interfaceimport type { ColorDisplayStyles } from '@pbroom/color-kit/driver';color-display.ts:10
interface ColorDisplayStyles {
  backgroundColor: string;
  background: string;
}

Properties

backgroundColorstring
sRGB color: hex when opaque, otherwise rgb(... / alpha).
backgroundstring
Color to paint: color(display-p3 ...) in the P3 gamut, else the sRGB value.