
Generate ggplot2 color and fill scales dynamically
generate_color_scale.Rd
This function intelligently applies manual or automatically generated color/fill scales based on the number of unique levels in the specified variable and the available custom colors. If the variable is continuous, it defaults to a viridis scale.
Usage
generate_color_scale(data, var_name, current_colors, type = c("color", "fill"))