1.0.5 • Published 6 years ago

react-color-contrast-chart v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

react-color-contrast-chart

"takes an array of colors and generates a table showing wcag scores for all possible color combinations"

NPM JavaScript Style Guide

Install

npm install --save react-color-contrast-chart

End Goal

The package should generate a chart similar to this one

example chart

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

1.0.5

6 years ago

1.0.4

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago