how we can change the shades color
jztlucky6264 opened this issue · 2 comments
jztlucky6264 commented
how we can change the shades color
MiracleCK commented
您好,我已经收到你的信件!我会及时阅读并作出回应!
whitelabtorino commented
In this part of the code (line 1565)
function generateColor () { let c = HSVtoRGB(Math.random(), 1.0, 1.0); c.r *= 0.15; c.g *= 0.15; c.b *= 0.15; return c; }
you have to change the values at MathRandom.
For example:
function generateColor() { // For shades of blue and cyan, you should set the hue around 0.5-0.66 let hue = Math.random() * 0.16 + 0.5; // This generates a random number between 0.5 and 0.66 let c = HSVtoRGB(hue, 1.0, 1.0) c.r *= 0.15 c.g *= 0.15 c.b *= 0.15 return c }
.
This way, your code will only generate shades of blue. If you want the blue to be more intense, you might consider removing or reducing the reduction for the value of c.b