🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

@fantasy-color/contrast-ratio-luminance

Package Overview
Dependencies
Maintainers
9
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fantasy-color/contrast-ratio-luminance

Calculate the contrast ratio of two relative luminances

latest
Source
npmnpm
Version
2.1.0
Version published
Maintainers
9
Created
Source

@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

FAQs

Package last updated on 06 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts