|
@@ -2,8 +2,8 @@
|
|
|
// https://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/
|
|
|
const goldenRatioConj = 0.618033988749895;
|
|
|
|
|
|
-const getColorGenerator = () => {
|
|
|
- let h = 0;
|
|
|
+const getColorGenerator = (hInit = null) => {
|
|
|
+ let h = hInit ?? Math.random();
|
|
|
const nextColor = () => {
|
|
|
const h6 = h * 6;
|
|
|
h += goldenRatioConj;
|