Excellent article and very instructive. However, in the section called " The Code", you show
var a_range = [1, 1];
but later you show the following
var color = getRandomColor([0, 360],
[90, 100],
[0, 90],
[0, 1]);
which is confusing because are you really specifying a range of alpha values or just one value. The actual code shows
var a_range = [1, 1];
which I believe will only give you one value of alpha, namely 1.
Thanks for pointing that out! That is a mistake. Fixed it
I like this code! Yours would have given me more to play with when I built a kind of (don’t tell anyone) Lite-Brite game on CodePen. My random colour code was -
let hex = Math.floor(Math.random() * 0xFFFFFF);
let colr = "#" + ("000000" + hex.toString(16)).substr(-6);
Careful here, this random color never makes #ffffff
But I dig the lite brite
True, a limitation though I can live with it
Thank you!
White is overrated.
Saw this just now, reminded me of yours :beam:
That is cool haha.
Too Cool! LOL