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
Right now, when you add a class, it picks a random color. It looks like it does this with the function getRandomColorPair() in antplanner2.js
I think it would look a lot neater if the color of the discussions looked a lot more similar to the classes they're similar too. Since lectures and their discussions usually have similar class codes (i.e. lecture code is 45200 and discussion is 45201), you could instead generate a color based on that. This would make it so that similar classes are more likely to have similar colors
One simple way you could do this is to simply round 45200 to it's lowest 5, multiply it by 16, and then convert that number to its hex code.
You can obviously tweak it in a lot of ways tho. If you make the alpha value big enough I think all colors would work. I'm not really familiar with Javascript, but if there's a simple way to mess HSL instead of hex codes, that approach might be more fruitful as well
The text was updated successfully, but these errors were encountered:
Right now, when you add a class, it picks a random color. It looks like it does this with the function getRandomColorPair() in antplanner2.js
I think it would look a lot neater if the color of the discussions looked a lot more similar to the classes they're similar too. Since lectures and their discussions usually have similar class codes (i.e. lecture code is 45200 and discussion is 45201), you could instead generate a color based on that. This would make it so that similar classes are more likely to have similar colors
One simple way you could do this is to simply round 45200 to it's lowest 5, multiply it by 16, and then convert that number to its hex code.
(the max value of a hex code is 16777216)
Some examples:
20000 -- > #04e200 (lime)
63010 --> #0f2828 (dark turquoise)
63014 --> #0f2828
70010 --> #1118e0 (strong blue)
99999 --> #f423f0 (strong purple)
You can obviously tweak it in a lot of ways tho. If you make the alpha value big enough I think all colors would work. I'm not really familiar with Javascript, but if there's a simple way to mess HSL instead of hex codes, that approach might be more fruitful as well
The text was updated successfully, but these errors were encountered: