Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emilymclean/contrast-accessibility
Provides a utility class for checking contrast accessibility between colors and calculating contrast ratios using the standards defined in WCAG 2.1.
https://github.com/emilymclean/contrast-accessibility
java-library wcag2
Last synced: 16 days ago
JSON representation
Provides a utility class for checking contrast accessibility between colors and calculating contrast ratios using the standards defined in WCAG 2.1.
- Host: GitHub
- URL: https://github.com/emilymclean/contrast-accessibility
- Owner: emilymclean
- License: mit
- Created: 2024-05-03T13:19:52.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-11-18T00:33:58.000Z (about 2 months ago)
- Last Synced: 2024-11-18T01:27:46.091Z (about 2 months ago)
- Topics: java-library, wcag2
- Language: Java
- Homepage: https://emilym.cl/contrast-accessibility/javadoc
- Size: 236 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Contrast Accessibility
[![Build](https://github.com/BenMMcLean/contrast-accessibility/actions/workflows/build.yml/badge.svg)](https://github.com/BenMMcLean/contrast-accessibility/actions/workflows/build.yml)
[![Lint](https://github.com/BenMMcLean/contrast-accessibility/actions/workflows/lint.yml/badge.svg)](https://github.com/BenMMcLean/contrast-accessibility/actions/workflows/lint.yml)
[![Test](https://github.com/BenMMcLean/contrast-accessibility/actions/workflows/test.yml/badge.svg)](https://github.com/BenMMcLean/contrast-accessibility/actions/workflows/test.yml)Provides a utility class for checking contrast accessibility between colors and calculating contrast ratios using the standards defined in WCAG 2.1.
## Installation
![Stable](https://img.shields.io/github/v/release/BenMMcLean/contrast-accessibility?label=Stable)
![Preview](https://img.shields.io/github/v/release/BenMMcLean/contrast-accessibility?label=Preview&include_prereleases)```
implementation "cl.emilym:contrast-accessibility:"
```## Usage
```java
long color1 = 0xFF0000; // Red
long color2 = 0x000000; // Black
System.out.println(ContrastAccessibility.valid(color1, color2)); // True
```