Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ninjinkun/p5-w3c-accessiblecolor

Determine a color pair is WCAG 2.0 valid.
https://github.com/ninjinkun/p5-w3c-accessiblecolor

Last synced: about 2 months ago
JSON representation

Determine a color pair is WCAG 2.0 valid.

Awesome Lists containing this project

README

        

# W3C::AccessibleColor
Determine a color pair is WCAG 2.0 valid.

# Usage
```perl
use W3C::AccessibleColor;
use Perl6::Say;

my $color1 = [123, 123, 244]; # rgb
my $color2 = [12, 22, 100];

say 'valid pair' if is_valid_color_pair($color1, $color2);

my ($color3, $color4) = random_color_pair(); # get color pair
# useful for CAPTCHA
```