This commit is contained in:
Azgaar 2019-09-10 02:44:34 +03:00
parent c0a634bec1
commit 5a1b747da8
11 changed files with 182 additions and 51 deletions

View file

@ -201,7 +201,7 @@ function getRandomColor() {
// mix a color with a random color
function getMixedColor(color, mix = .2, bright = .3) {
const c = color[0] === "#" ? color : getRandomColor(); // if provided color is not hex (e.g. harching), generate random one
const c = color && color[0] === "#" ? color : getRandomColor(); // if provided color is not hex (e.g. harching), generate random one
return d3.color(d3.interpolate(c, getRandomColor())(mix)).brighter(bright).hex();
}