@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.
import type { ColorDisplayStyles } from '@pbroom/color-kit/driver';color-display.ts:10interface ColorDisplayStyles {
backgroundColor: string;
background: string;
}Properties
- backgroundColor
string - sRGB color: hex when opaque, otherwise
rgb(... / alpha). - background
string - Color to paint:
color(display-p3 ...)in the P3 gamut, else the sRGB value.