PHPackages                             harmstyler/contrast-ratio-calculator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. harmstyler/contrast-ratio-calculator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

harmstyler/contrast-ratio-calculator
====================================

Calculate contrast ratios of colors.

v1.0.1(7y ago)220.4k↓21.2%1LGPL-3.0PHPPHP &gt;=7.1

Since May 16Pushed 7y ago1 watchersCompare

[ Source](https://github.com/harmstyler/contrast-ratio-calculator)[ Packagist](https://packagist.org/packages/harmstyler/contrast-ratio-calculator)[ RSS](/packages/harmstyler-contrast-ratio-calculator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (4)Used By (0)

Contrast Ratio Calculator
=========================

[](#contrast-ratio-calculator)

Accessibility library that calculates contrast ratios of colors as well as rates the contrast ratio against WCAG standards.

Getting started
---------------

[](#getting-started)

1. PHP 7.1.x is required
2. Install the Contrast Ratio Calculator using Composer (recommended) or manually

### Composer Installation

[](#composer-installation)

1. [Get Composer](http://getcomposer.org/)
2. Install with `composer require harmstyler/contrast-ratio-calculator`
3. Add the following to your application's main PHP file: `require 'vendor/autoload.php'`;

Usage
-----

[](#usage)

```
