lighten
Commons
stable
Lightens an RGBA color by the given amount using CIE-Lab L* adjustment (via XYZ intermediate). Each unit of amount raises L* by 10.
API
Signature
Signature TypeScript complète, extraite du fichier util.
API
Paramètres
Paramètres d'entrée acceptés par cet util.
- valuerequisTRGBA
- The base color as an RGBA object { r, g, b, a? } (channel values 0–255).
- amountrequisnumber
- Lightness step. Each unit raises the CIE-Lab L* channel by 10. Negative values darken the color.
API
Valeur de retour
La valeur retournée par cet util.
- A new TRGBA object with the adjusted lightness. The original object is not mutated.
Usage
Exemples
Extraits de code prêts à coller.
Lighten a color by 2 steps