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