HSVtoCSS

Color
stable

Convert an HSV colour to a CSS rgb() or rgba() string. Delegates to HSVtoRGB then RGBtoCSS.

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

hsva
requis
THSVA
Colour in HSV space with optional alpha. h in [0, 360], s and v in [0, 1], a in [0, 1].

API

Valeur de retour

La valeur retournée par cet util.

CSS colour string: "rgb(r, g, b)" when alpha is undefined, "rgba(r, g, b, a)" otherwise.

Usage

Exemples

Extraits de code prêts à coller.

HSV to CSS string

typescript