shared
utils
string
object
is
extension
js
tracking
string
dom
when
selection
position
iframe
event
scroll
console
node
string
project
fs
console
convertColor
Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.color
This function take as input any color format like rgba Object, hsl Object, hsv Object, hex String, rgba String, hsl String or hsv String and convert it into the wanted format like “rgba”, “hsl”, “hsv”, “hex”, “rgbaString”, “hslString” or “hsvString”
Params
- input*-Mixed
The input color to convert
- format”rgba”String
The format wanted
Return
- -Mixed
The converted color
Example
import { convertColor } from '@blackbyte/sugar/color';
convertColor('rgba(10,20,30,100)', 'rgba'); // => { r: 10, g: 20, b: 30, a: 100 }Todo
- testsnormal
Author
- Olivier Bosselolivier.bossel@gmail.comhttps://blackbyte.space