@eknowles/color-this
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

color-this

npm Travis branch Coveralls github branch GitHub stars GitHub issues semantic-release

Generate a random color from a given string

Add color to graph series names, months of the year, days of the week, super useful to add a unique subtle differentiator.

Demos

Getting Started

Load from npm

# NPM
npm i @eknowles/color-this

# Yarn
yarn add @eknowles/color-this

Now import and use in React, Node or wherever!

import React from 'react';
import ct from '@eknowles/color-this';

export const MyLabelComponent = ({text}) => (
  <div style={{background: ct(text)}}>{text}</div>
);

Frameworks

AngularJS - http://eknowles.github.io/angular-color-this/

Readme

Keywords

Package Sidebar

Install

npm i @eknowles/color-this

Weekly Downloads

800

Version

1.1.3

License

MIT

Unpacked Size

192 kB

Total Files

7

Last publish

Collaborators

  • eknowles