Skip to content

Latest commit

 

History

History

from-rgba

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

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