@fantasy-color/from-hex
v2.1.0
Published
Parse HEX CSS strings into RGB objects
Keywords
Readme
@fantasy-color/from-hex
Parse a CSS HEX string into a RGB object.
type fromHex = (hex: string) => RGBExample usage:
import fromHex from '@fantasy-color/from-hex'
fromHex('#FFFF00')
// { red: 255, green: 255, blue: 0 }