Skip to content

Repository files navigation

color-parser

CSS color string parser

Installation

$ component install component/color-parser

Example

varparse=require('color-parser');parse('#fc0')// => { r: 255, g: 204, b: 0, a: 1 }parse('#ffcc00')// => { r: 255, g: 204, b: 0, a: 1 }parse('rgb(255, 204, 0)')// => { r: 255, g: 204, b: 0, a: 1 }parse('rgba(255, 204, 0, 1)')// => { r: 255, g: 204, b: 0, a: 1 }

License

MIT

About

CSS color string parser

Resources

Stars

18 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages