@fantasy-color/from-hex
Parse a CSS HEX string into a RGB
object.
type fromHex = (hex: string) => RGB
Example usage:
import fromHex from '@fantasy-color/from-hex'
fromHex('#FFFF00')
// { red: 255, green: 255, blue: 0 }
Parse a CSS HEX string into a RGB
object.
type fromHex = (hex: string) => RGB
Example usage:
import fromHex from '@fantasy-color/from-hex'
fromHex('#FFFF00')
// { red: 255, green: 255, blue: 0 }
npm i @fantasy-color/from-hex
7
2.1.0
MIT
5.05 kB
9