Easily generate patterns for use in data graphics
Latest commit c32a840 Dec 19, 2016 @ashiguruma 1.3.0



Easily generate patterns for use in data graphics.

Pattern example

But why?

Color-blindness, that's why.

This library came about as part of an issue in Chart.js.


npm install patternomaly

Generate a single canvas pattern

pattern.draw('square', '#1f77b4');

Generate an array of canvas patterns


Providing a Pattern Alternative

In order to provide an alternative view for visually impaired viewers it's a good idea to provide a patterned alternative.

See the pattern option example page for a simple implementation of a pattern toggle switch for Chart.js.