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

2.1.0 • Public • Published

@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

Readme

Keywords

none

Package Sidebar

Install

npm i @fantasy-color/luminance-rgb

Weekly Downloads

2

Version

2.1.0

License

MIT

Unpacked Size

4.61 kB

Total Files

9

Last publish

Collaborators

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