Examples for 'ggthemes::canva_pal'


Canva.com color palettes

Aliases: canva_pal

Keywords:

### ** Examples

require("ggplot2")
Loading required package: ggplot2
require("tibble")
Loading required package: tibble
if (require("purrr") && require("scales") && require("dplyr")) {
        canva_df <- map2_df(
                canva_palettes,
                names(canva_palettes),
                ~ tibble(
                        colors = .x,
                        .id = seq_along(colors),
                        palette = .y
                )
        )
        ggplot(canva_df, aes(
                y = palette,
                x = .id,
                fill = colors
        )) +
                geom_raster() +
                scale_fill_identity(guide = FALSE) +
                theme_minimal() +
                theme(panel.grid = element_blank(),
                      axis.text.x = element_blank()) +
                labs(x = "", y = "")

        show_col(canva_pal("Fresh and bright")(4))
        show_col(canva_pal("Cool blues")(4))
        show_col(canva_pal("Modern and crisp")(4))
}
Loading required package: purrr
Attaching package: 'purrr'
The following object is masked from 'package:FastRWeb':

    done
Loading required package: scales
Attaching package: 'scales'
The following object is masked from 'package:purrr':

    discard
Loading required package: dplyr
Attaching package: 'dplyr'
The following object is masked from 'package:rcloud.support':

    select
The following objects are masked from 'package:stats':

    filter, lag
The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union
plot of chunk example-ggthemes-canva_pal-1
plot of chunk example-ggthemes-canva_pal-1
plot of chunk example-ggthemes-canva_pal-1

[Package ggthemes version 4.2.4 Index]