Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 296 Bytes

readme.md

File metadata and controls

16 lines (11 loc) · 296 Bytes

@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 }