@fantasy-color/rgba-to-hsva
v2.1.0
Published
Transform RGBA objects to HSVA objects
Downloads
11
Keywords
Readme
@fantasy-color/rgba-to-hsva
Transform a RGBA
color object to a HSVA
color object.
type rgbaToHsva = (color: RGBA) => HSVA
Example usage:
import rgbaToHsva from '@fantasy-color/rgba-to-hsva'
rgbaToHsva({
red: 60,
green: 32,
blue: 23,
alpha: 0.5
})
// { hue: 15, saturation: 62, value: 24, alpha: 0.5 }