@pbroom/color-kit/driverSlider gradient

SliderGradientStop

One sampled gradient stop; see sampleSliderGradient.

interfaceimport type { SliderGradientStop } from '@pbroom/color-kit/driver';slider-gradient.ts:144
interface SliderGradientStop {
  t: number;
  value: number;
  color: Color;
  activeColor: Color;
  srgbColor: Color;
  activeCss: string;
  srgbCss: string;
}

Properties

tnumber
Normalized position in [0, 1]
valuenumber
Channel value sampled at this stop
colorColor
Sampled color before gamut mapping (OKLCH, may be out of gamut).
activeColorColor
color gamut-mapped into the requested colorSpace.
srgbColorColor
color gamut-mapped into sRGB; the fallback for non-P3 displays.
activeCssstring
CSS stop color in the requested space: color(display-p3 …) or rgb(…).
srgbCssstring
CSS stop color in sRGB (rgb(...)).