๐ตconvertColors
Convert colors to another format: e.g hex to rgb
Converting Hex colors to RGB colors
import { convertColors } from 'the-simplifier'
let convert = async() => {
let result = await convertColors('HexToRGB', {
hexCode: '#FFFFFF'
})
console.log(result)
}
convert() // Expected: [255, 255, 255]
"hexCode" value must be a string & started with "#".
The param "HexToRGB" not support "rgbCode" key.
import { convertColors } from 'the-simplifier'
let convert = async() => {
let result = await convertColors('RGBToHex', {
rgbCode: [255, 255, 255]
})
console.log(result)
}
convert() // Expected: #FFFFFF
"rgbCode" value must be a number array.
The param "RGBToHex" not support "hexCode" key.
Last updated
Was this helpful?