2.1.0 • Published 5 years ago
@fantasy-color/from-rgb v2.1.0
@fantasy-color/from-rgb
Parse a CSS RGB string into a RGB object.
type fromRgb = (rgb: string) => RGBExample usage:
import fromRgb from '@fantasy-color/from-rgb'
fromRgb('rgb(0, 250, 10)')
// { red: 0, green: 250, blue: 10 }