Generate colors for Sample Groups
get_colors.RdAssigns colors to each unique sample group in metadata. If the number of groups is 12 or fewer, colors are assigned using a color-blind friendly palette. For more than 12 groups, the function uses the Polychrome package to generate a distinct color palette.
Details
If there are 12 or fewer unique groups, the function assigns colors using a predefined color-blind friendly palette.
If there are more than 12 groups, it leverages Polychrome to generate distinct colors.
If grDevices is not installed, an error is thrown when handling more than 12 groups.
group must be a vector.