nusmods icon indicating copy to clipboard operation
nusmods copied to clipboard

feat: Enable flexible number of colors for themes

Open joeng03 opened this issue 1 year ago • 7 comments

  • instead of fixing the number of colors for a theme to 8 colors, now we are able to support a variable number of colors
  • add a new theme, 'Tequila' with 10 colors as Proof of Concept

Context

#3443

Implementation

Screenshot 2023-08-03 124401 One issue I was facing was that when shifting from themes with higher number of colors to themes with lower number of colors, some courses would get rendered as white color as their colorIndex exceeds the numOfColors of the current theme. One way to solve this would be to dispatch a new action to set the colorIndex of all courses to colorIndex % numOfColors.

Other Information

joeng03 avatar Aug 04 '23 01:08 joeng03