@pbroom/color-kitConversion

hsvToRgb

Convert HSV/HSB (hue in degrees, saturation and value 0-100) to 8-bit sRGB (0-255, each channel rounded to an integer). Any finite hue is accepted and wrapped.

functionimport { hsvToRgb } from '@pbroom/color-kit';hsv.ts:129
function hsvToRgb(hsv: Hsv): Rgb;

Parameters

hsvHsv
HSV color

Returns

RgbA new Rgb with integer channels

Example

TypeScript
import { hsvToRgb } from '@pbroom/color-kit';

hsvToRgb({ h: 210, s: 50, v: 80, alpha: 1 }); // → { r: 102, g: 153, b: 204, alpha: 1 }

See also