Purpose:
- Given a set of colors previously assigned
- Request to add N colors to the set
- Return new set of categorical colors
given_colors- character vector of colors; bonus points: list of character vectors or color functions - convert color function to vector by using its color steps, same asjamba::showColors()n- number of new colors to addcolor_fn- function to generate new colors for testing. DefaultrainbowJam()or in futurefibonacci_colors()
- Create
new_colorswithcolor_fn - Call
slot_colors()to assigngiven_colorstonew_colors - If
ncolors are unassigned, assign them in order. - If fewer than
ncolors remain, repeat step (1) withn+1colors.