The scale_color_conesa function acts as a bridge between these palettes and the ggplot2 package, allowing users to apply the palettes to their plots Depending on the nature of the data (continuous or discrete), the function intelligently selects the appropriate scale from ggplot2 to render the colors.
When the continuous parameter is set to TRUE, the function employs the scale_color_gradientn function from ggplot2 to generate a continuous color scale. Conversely, for discrete data, the discrete_scale function is utilized. This ensures that the chosen palette is optimally represented in the plot, irrespective of the data type.