RGBtoCSS
Color
stable
Serialize an sRGB object to a CSS rgb() or rgba() string. Emits rgba() only when the alpha property is defined.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- {r, g, b, a}requisTRGBA
API
Valeur de retour
La valeur retournée par cet util.
- "rgb(r, g, b)" when alpha is undefined; "rgba(r, g, b, a)" when alpha is provided.
Usage
Exemples
Extraits de code prêts à coller.
Opaque and semi-transparent colours