@fantasy-color/from-hex
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

@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 }

Readme

Keywords

none

Package Sidebar

Install

npm i @fantasy-color/from-hex

Weekly Downloads

7

Version

2.1.0

License

MIT

Unpacked Size

5.05 kB

Total Files

9

Last publish

Collaborators

  • ijigg
  • moria.am
  • atilaz
  • gideon.gur
  • irminakacz
  • fernando.3
  • xaviervia
  • psxcode
  • deepsweet