How to generate random pastel (or brighter) color in Javascript?

HSL Colors Using HSL Colors colors may be the easiest. HSL color values are specified in CSS as hsl( hue, saturation%, lightness%) where hue is in range 0-360 (without a unit marker when using degrees), and both saturation and lightness are percentages 0-100 with a trailing % sign. Note “Bright” colors refer to the colors … Read more

How to generate a number of most distinctive colors in R?

I joined all qualitative palettes from RColorBrewer package. Qualitative palettes are supposed to provide X most distinctive colours each. Of course, mixing them joins into one palette also similar colours, but that’s the best I can get (74 colors). library(RColorBrewer) n <- 60 qual_col_pals = brewer.pal.info[brewer.pal.info$category == ‘qual’,] col_vector = unlist(mapply(brewer.pal, qual_col_pals$maxcolors, rownames(qual_col_pals))) pie(rep(1,n), col=sample(col_vector, … Read more