项目作者: diegonz

项目描述 :
Color accessibility tool following Web Content Accessibility Guidelines (WCAG) 2.0
高级语言: PHP
项目地址: git://github.com/diegonz/color-wcag2.git
创建时间: 2019-03-27T20:56:50Z
项目社区:https://github.com/diegonz/color-wcag2

开源协议:MIT License

下载


ColorWcag2

Travis Build Status
StyleCI Status
Codecov Status
Latest Version on Packagist

Laravel simple color accessibility tool, following Web Content Accessibility Guidelines (WCAG) 2.0

Installation

Require the package using composer:

  1. composer require diegonz/color-wcag2

Javascript asset [optional]

Run the artisan command to generate de javascript asset:

  1. php artisan color-wcag2:generate

Then include the javascript asset in your template like this:

  1. <script src="{{ asset('js/color-wcag2.js') }}"></script>

Usage

PHP

  1. <?php
  2. use \Diegonz\ColorWcag2\Facades\ColorWcag2;
  3. ColorWcag2::contrast('#5b77a0', '#fffffff');
  4. // bool(true)

Javascript

  1. colorWcag2.contrast('#5b77a0', '#fffffff');
  2. // "true"

Testing

  1. 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.