2.1.0 • Published 3 years ago

@fantasy-color/rgb-to-lab v2.1.0

Weekly downloads
257
License
MIT
Repository
github
Last release
3 years ago

@fantasy-color/rgb-to-lab

Transform a RGB color object to a LAB color object.

type rgbToLab = (color: RGB) => LAB

Example usage:

import rgbToLab from '@fantasy-color/rgb-to-lab'

rgbToLab({
  red: 60,
  green: 32,
  blue: 23
})
// { luminance: 15.966897718378611, a: 13.086860007892998, b: 12.202929512042749 }