@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 }
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 }
npm i @fantasy-color/from-rgb
1
2.1.0
MIT
5.31 kB
9