2.1.0 • Published 3 years ago

@fantasy-color/luminance-rgb v2.1.0

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

@fantasy-color/luminance-srgb

Calculate the relative luminance of an RGB color, coded as sRGB

type luminanceSrgb = (color: RGB) => number

Example usage:

import luminanceSrgb from '@fantasy-color/luminance-srgb'

luminanceSrgb({
  red: 1,
  green: 0.27,
  blue: 0.2
})
// > 0.420144