Search results

39 packages found

calculate relative luminance

published version 2.0.1, 6 years ago6 dependents licensed under $BSD-2-Clause
335,813

APCA: the Accessible Perceptual Contrast Algorithm, a modern contrast method that improves readability contrast on self-illuminated displays. Developed for the W3C's WCAG 3 and other standards.

published version 0.1.9, 3 years ago19 dependents licensed under $Limited W3 License
101,509

Detects if a hex color is dark or light. It is based on the w3 documentation for color luminance: https://www.w3.org/TR/WCAG20/#relativeluminancedef

published version 1.2.0, 7 years ago13 dependents licensed under $MIT
80,976

A utility library for calculating luminance, contrast ratio, and appropriate contrast colors to ensure web accessibility.

published version 1.1.0, 8 months ago0 dependents licensed under $MIT
21,272

Calculate contrast ratio between two CSS color strings.

published version 0.2.1, 6 years ago9 dependents licensed under $GPL-3.0
5,760

Get relative luminance from a color string.

published version 1.0.0, 5 years ago2 dependents licensed under $GPL-3.0
6,995

The Color Contrast Finder is a library that automatically selects text colors that contrast with a given color.

published version 1.0.3, 15 days ago0 dependents licensed under $MIT
4,539

Relative luminance formula

published version 2.1.0, 2 years ago0 dependents licensed under $MIT
4,443

Utility functions for working with colors in adherence to WCAG 2.1 guidelines.

published version 1.0.8, 5 months ago5 dependents licensed under $MIT
2,804

bare-bones color luminance functions

published version 2.1.0, 10 years ago6 dependents licensed under $BSD-3-Clause
2,842

Lightweight (no dependencies) and fast color brightness detector built with Flow Types.

published version 1.0.1, 7 years ago0 dependents licensed under $MIT
1,385

Calculate the color in an array of colors that gives the highest contrast to another color.

published version 0.3.1, 6 years ago4 dependents licensed under $GPL-3.0
1,500

A package based on WCAG 2.0 to easily check contrast ratio.

published version 1.1.7, 2 years ago0 dependents licensed under $MIT
953

Super simple color manipulation using getters and setters

published version 0.3.0, 8 years ago1 dependents licensed under $MIT
1,019

A React hook for using luminance,support React18

published version 0.1.3, 3 years ago1 dependents licensed under $MIT
566

Calculate theme contrast based on canvas image data

published version 1.2.95, 13 days ago0 dependents licensed under $MIT
376

SafeColor generates accessible colors that compiles with WCAG success criteria 1.4.3 (or any contrast ratio of your choice). It can generate either a random color that is contrast safe with a given color, or a consistent color for a given string.

published version 1.0.1, 6 years ago0 dependents licensed under $MIT
565

Convert RGB to grayscale

published version 1.0.3, 11 years ago4 dependents licensed under $MIT
259

Library for converting colour codes and manipulating relative luminance and contrast ratio

published version 0.0.9, a year ago1 dependents licensed under $MIT
232

Calculate theme contrast based on canvas image data

published version 1.2.92, 13 days ago0 dependents licensed under $MIT
109