Skip to contents

See pal_tron() for details.

Usage

scale_color_tron(palette = c("legacy"), alpha = 1, ...)

scale_colour_tron(palette = c("legacy"), alpha = 1, ...)

scale_fill_tron(palette = c("legacy"), alpha = 1, ...)

Arguments

palette

Palette type. Currently there is one available option: "legacy" (7-color palette).

alpha

Transparency level, a real number in (0, 1]. See alpha in grDevices::rgb() for details.

...

Additional parameters for ggplot2::discrete_scale().

Author

Nan Xiao | me@nanx.me | https://nanx.me

Examples

example_scatterplot() +
  ggplot2::theme_dark() +
  ggplot2::theme(
    panel.background = ggplot2::element_rect(fill = "#2D2D2D"),
    legend.key = ggplot2::element_rect(fill = "#2D2D2D")
  ) +
  scale_color_tron()
#> `geom_smooth()` using formula = 'y ~ x'


example_barplot() +
  ggplot2::theme_dark() +
  ggplot2::theme(
    panel.background = ggplot2::element_rect(fill = "#2D2D2D")
  ) +
  scale_fill_tron()