1.0.5 • Published 6 years ago
react-color-contrast-chart v1.0.5
react-color-contrast-chart
"takes an array of colors and generates a table showing wcag scores for all possible color combinations"
Install
npm install --save react-color-contrast-chart
End Goal
The package should generate a chart similar to this one
Usage
import React, { Component } from 'react'
// you will definitely want to add your own styles
import './style.css'
import {ColorContrastChart as CCC} from 'react-color-contrast-chart'
class Example extends Component {
const colors = [
{
name: 'primary',
// colors can be named, hex, or rgb
value: 'rebeccapurple'
},
{
name: 'secondary',
value: 'lime'
},
{
// name value is optional
value: '#cccccc'
},
]
return (
<CCC colors={colors} />
)
}
License
MIT © ryanfiller