Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

color-blocks

Jense52MIT1.0.0

Generate color blocks from hex colors

color-blocks

readme

Color Blocks

Create basic images of color patterns.
You can use any color format supported here.
The output of the snippet below can be found here.

# Install with npm
$ npm install --save color-blocks
// This code will generate the image shown below.
// Pass the square size (in pixels), colors, and output location.
import createColorPattern from 'color-blocks';
createColorPattern(50, ['#ff2100', '#00ff7b', '#161dff'], 'output.png').then(() => {});