You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In team.js, createTeam will pick random colors between a range in a while loop. The downsides to this approach are:
Can theoretically run forever (though practically impossible)
Can pick the same color for two different teams, or colors that are near indistinguishable
Consider one of these approaches:
Store an array of all the colors you want to use, then pick one based on the team index (either passed in, or tracked by a variable in the file)
Have a baseline color (like <48, 48, 48>). Figure out how large the steps between color can be (there should be a maximum team size, since Discord only lets you have 500 channels per server). Treat the array like a set of digits, and keep increasing it until you reach the lightest color. Then, go back to your baseline color, and start again. For example, if your step size is 20, the colors would be <48, 48, 48>, <48, 48, 68>, ..., <48, 48, 248>, <48, 68, 48>, ...
Then, you can either pass in the team index, or track it in the file.
The text was updated successfully, but these errors were encountered:
I could pre-define an attractive set of colors and then iterate through them, though there would still be repeating across different brackets ( / team ranges). do you think that would be okay?
In team.js, createTeam will pick random colors between a range in a while loop. The downsides to this approach are:
Consider one of these approaches:
The text was updated successfully, but these errors were encountered: