@fantasy-color/rgb-to-hcl
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

@fantasy-color/rgb-to-hcl

Transform a RGB color object to a HCL color object.

type rgbToHcl = (color: RGB) => HCL

Example usage:

import rgbToHcl from '@fantasy-color/rgb-to-hcl'

rgbToHcl({
  red: 60,
  green: 32,
  blue: 23
})
// { hue: 42.99820879411349, chroma: 17.893501433259868, luminance: 15.966897718378611 }

Readme

Keywords

none

Package Sidebar

Install

npm i @fantasy-color/rgb-to-hcl

Weekly Downloads

1

Version

2.1.0

License

MIT

Unpacked Size

4.47 kB

Total Files

9

Last publish

Collaborators

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