diegonz / color-wcag2
Color accessibility tool following Web Content Accessibility Guidelines (WCAG) 2.0
Installs: 3 886
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^7.1
Requires (Dev)
- orchestra/testbench: 3.8.*
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2024-11-05 09:06:36 UTC
README
Laravel simple color accessibility tool, following Web Content Accessibility Guidelines (WCAG) 2.0
Installation
Require the package using composer:
composer require diegonz/color-wcag2
Javascript asset [optional]
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>
Usage
PHP
<?php use \Diegonz\ColorWcag2\Facades\ColorWcag2; ColorWcag2::contrast('#5b77a0', '#fffffff'); // bool(true)
Javascript
colorWcag2.contrast('#5b77a0', '#fffffff'); // "true"
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email diego@smartidea.es instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.