filters are based on rgb values
palette_filter(
palette = palette_qualitative(),
similar = F,
greys = T,
reds = T,
greens = T,
blues = T,
dark = T,
medium = T,
bright = T,
thresh_similar = 25
)
any vector with hex color values, Default: palette_qualitative()
logical, allow similar colours, similar colours are detected using a threshold (thresh_similar), two colours are similar when each value for RGB is within threshold range of the corresponding RGB value of the second colour, Default: F
logical, allow grey colours, blue == green == blue , Default: T
logical, allow red colours, blue < 50 & green < 50 & red > 200 , Default: T
logical, allow green colours, green > red & green > blue, Default: T
logical, allow blue colours, blue > green & green > red, Default: T
logical, allow colours of dark intensity, sum( red, green, blue) < 420 , Default: T
logical, allow colours of medium intensity, between( sum( red, green, blue), 420, 600) , Default: T
logical, allow colours of bright intensity, sum( red, green, blue) > 600, Default: T
int, threshold for defining similar colours, see similar, Default: 25
vector with hex colors
require(magrittr)
#> Loading required package: magrittr
palette_qualitative() %>%
palette_filter(thresh_similar = 0) %>%
palette_plot_intensity()
if (FALSE) {
# more examples---------------------------
palette_qualitative() %>%
palette_filter(thresh_similar = 25) %>%
palette_plot_intensity()
palette_qualitative() %>%
palette_filter(thresh_similar = 0, blues = FALSE) %>%
palette_plot_intensity()
}