errisy-color
v1.0.0
Published
RGBA to HSVA and HSVA to RGBA color conversion and Color Parser.
Downloads
1
Maintainers
Readme
Errisy-Color
RGBA to HSVA and HSVA to RGBA color conversion.
RGBA HSVA Colors
parse color and perform color conversion:
import * as {Color} from 'errisy-color';
let c: Color = Color.parse('Cyan'); //you can also parse formats such as rgba(24, 30, 80, 24) or #0ff or #0acbf2
let hsv = c.toHSV(); //convert to HSV
hsv.S = 100; //set 100% saturation.
let c2 = hsv.toColor(); //convert back to RGBA