0.0.6 • Published 2 years ago

@strategies/color-utils v0.0.6

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
2 years ago

Color Utilities

Currently only a single ColorProvider class is provided here, but we may add additional utilities for working with color - particularly related to data visualization.

Install

pnpm install @strategies/color-utils

Example

Use with default palettes:

import {ColorProvider} from '@strategies/color-utils';

const colorProvider = new ColorProvider();
const newColor = colorProvider.next();

OR

const newColor = colorProvider.random();

Specify custom palettes:

import {colorbrewerPalettes, ColorProvider} from '@strategies/color-utils';

const palette1 = colorbrewerPalettes.Pastel1['9'];
const palette2 = colorbrewerPalettes.Accent['8'];

const colorProvider = new ColorProvider([palette1, palette2]);
const newColor = colorProvider.next();

Publish

There is no build step - only TS environments are supported.

Commit to Git, then:

pnpm publish
0.0.5

2 years ago

0.0.6

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago