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

2.1.0 • Public • Published

@fantasy-color/contrast-ratio-luminance

Calculate the contrast ratio between two relative luminances

type contrastRatioLuminance = (luminance1: number, luminance2: number) => number

Example usage:

import contrastRatioLuminance from '@fantasy-color/contrast-ratio-luminance'

contrastRatioLuminance(0.5, 0.8)
// > 1.5454545454545454

Readme

Keywords

none

Package Sidebar

Install

npm i @fantasy-color/contrast-ratio-luminance

Weekly Downloads

0

Version

2.1.0

License

MIT

Unpacked Size

4.02 kB

Total Files

9

Last publish

Collaborators

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