Crates.io | contrast-checker |
lib.rs | contrast-checker |
version | 0.1.1 |
source | src |
created_at | 2020-09-26 06:58:41.693078 |
updated_at | 2020-09-26 07:23:33.898261 |
description | A simple CLI tool for calculating the contrast ratio between two colours |
homepage | |
repository | https://github.com/patchan/contrast-checker/ |
max_upload_size | |
id | 293090 |
size | 10,826 |
A simple Rust-based CLI tool for calculating the contrast ratio between two colours.
Colour contrast ratio is calculated based on WCAG 2.0 guidelines.
If you have Rust installed, you can run
cargo install contrast-checker
You can calculate the contrast between two colours by using:
contrast-checker <color1> <color2>
color1
and color2
are entered as either a Hex code without the #
(i.e. ffffff
) or as a comma separated RGB list (i.e. 255,255,255
).
For example:
contrast-checker ffffff 255,255,255