icssc / AntAlmanac

A course exploration and scheduling tool for UCI Anteaters
https://antalmanac.com
MIT License
58 stars 73 forks source link

fix: default colors deplete too rapidly #1006

Closed matt-franklin225 closed 1 month ago

matt-franklin225 commented 2 months ago

Summary

Adjusted color selection to work by linear assignment from the 8th course onward. This is done by determining the color of the most recent class added and choosing the color directly after it in the defaultColors list (looping back around to the first color when needed).

Test Plan

Closes #647

Future Followup

There can still be some imbalance in colors if many classes are added and some deleted--if keeping all the colors even is a priority we could auto-update the colors of previously added classes, but that may be unnecessary or overkill. Can also add to the original 7-color palette if desired.

matt-franklin225 commented 2 months ago

Still need to adjust code so that it works properly when users select custom colors for their classes.