Laravel simple color accessibility tool, following Web Content Accessibility Guidelines (WCAG) 2.0
Require the package using composer:
composer require diegonz/color-wcag2
Run the artisan command to generate de javascript asset:
php artisan color-wcag2:generate
Then include the javascript asset in your template like this:
<script src="{{ asset('js/color-wcag2.js') }}"></script>
<?php
use \Diegonz\ColorWcag2\Facades\ColorWcag2;
ColorWcag2::contrast('#5b77a0', '#fffffff');
// bool(true)
colorWcag2.contrast('#5b77a0', '#fffffff');
// "true"
composer test
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.