Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

Tinycolor's monochromatic palette

node v8.17.0
version: 2.0.0
endpointsharetweet
const _ = require("lodash") const tinycolor = require("tinycolor2"); const color = 'green'; const number = 15 const offset = Math.round(number / 2); _.map(tinycolor(color).monochromatic(number), (color) => color.toHexString());
_(tinycolor(color).monochromatic(number + offset)).sortBy((color) => color.toHsv().v).map((color) => color.toHexString()).slice(offset).value()
Loading…

no comments

    sign in to comment