Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how we can change the shades color #84

Open
jztlucky6264 opened this issue Nov 16, 2022 · 2 comments
Open

how we can change the shades color #84

jztlucky6264 opened this issue Nov 16, 2022 · 2 comments

Comments

@jztlucky6264
Copy link

No description provided.

@MiracleCK
Copy link

MiracleCK commented Nov 16, 2022 via email

@whitelabtorino
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants