shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
applyModifiers
Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.color
This function allows you to apply some modifiers to a color. Supported modifiers are:
- lightness -100
- lighten -100
- darken -100
- saturation -100
- saturate -100
- desaturate -100
- hue -360
- spin -360
- alpha -100
Params
- input*-Mixed
The input color to apply modifiers on
- [modifiers]*-TApplyModifiersModifiers
The modifiers to apply
Return
- -TApplyModifiersModifiersResult
The converted color object
Example
import { applyModifiers } from '@blackbyte/sugar/color';
applyModifiers('rgba(10,20,30,100)', { lighten: 10 }); // => { r: 20, g: 30, b: 40, a: 100 }Todo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space