@fantasy-color/from-rgba
v2.1.0
Published
Parse RGBA CSS strings into RGBA objects
Downloads
19
Keywords
Readme
@fantasy-color/from-rgba
Parse a CSS RGBA string into a RGBA
object.
type fromRgba = (rgb: string) => RGBA
Example usage:
import fromRgba from '@fantasy-color/from-rgba'
fromRgba('rgb(0, 250, 10, 0.6)')
// { red: 0, green: 250, blue: 10, alpha: 0.6 }