View source: R/macos-colours.R
scale_colour_macos_light | R Documentation |
These scales meant to be used with light themes, e.g, theme_sf_light()
.
While they can be used with dark themes, in general, we recommend pairing
scale_colour_*_light
s with light themes for better clarity and contrast.
Notes
While macOS color palettes provide a total of 11 colors, we do not recommend using them for more than 8 groups. The last three colors often collide with other colors in the palette and may affect the clarity of your visualization.
See macOS colors for more details on raw colors.
scale_colour_macos_light( order = "contrast", accessible = FALSE, vibrant = FALSE, ... ) scale_fill_macos_light(order = order, accessible = FALSE, vibrant = FALSE, ...)
order |
Indicates the order of colors in the palette |
accessible |
Returns accessible alternative of colors |
vibrant |
Returns vibrant alternative of colors |
... |
Arguments passed on to
|
Other colour scales:
scale_colour_ios_dark()
,
scale_colour_ios_gray_dark()
,
scale_colour_ios_gray_light()
,
scale_colour_ios_light()
,
scale_colour_macos_dark()
,
scale_colour_watchos_dark()
## Not run: library(ggplot2) ggplot(mtcars, aes(y = mpg, x = as.factor(cyl))) + geom_boxplot(aes(color = as.factor(cyl), fill = as.factor(cyl))) + labs(x = "Miles Per Gallon", y = "MPG", fill = "Number of Cylinders", color = "Number of Cylinders", title = "Fuel Economy", subtitle = "Fuel economy declines as engines gets bigger", caption = "Data from the 1974 Motor Trend US magazine.") + theme_sf_light() + scale_fill_macos_light() + scale_colour_macos_light() ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.