FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

turtletopia/lgbthue: R package that provides palette data for pride flags for use by {gglgbtq} and future projects. · GitHub

Repository navigation

Public

About

R package that provides palette data for pride flags for use by {gglgbtq} and future projects.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

lgbthue

The goal of lgbthue is to provide palette data for pride flags for use by gglgbtq and future projects.

Installation

You can install the development version of lgbthue from GitHub with:

# install.packages("pak")
pak::pak("turtletopia/lgbthue")

User guide

To list all available palettes, call show_pride(). The output would be very long, however, so I’m not including the result. Instead, know it is possible to filter by tags and palette sizes:

library(lgbthue)
show_pride(tags = "rainbow", sizes = c(6, 8))
#> rainbow [6]
#>  █ #E40303
#>  █ #FF8C00
#>  █ #FFED00
#>  █ #008026
#>  █ #24408E
#>  █ #732982
#>  [rainbow]
#> 
#> philadelphia [8]
#>  █ #000000
#>  █ #784F17
#>  █ #D12229
#>  █ #F68A1E
#>  █ #FDE01A
#>  █ #007940
#>  █ #24408E
#>  █ #732982
#>  [rainbow]

Accessing one of these is best done by palette_lgbtq():

palette_lgbtq("lesbian")
#> lesbian [5]
#>  █ #D62900
#>  █ #FF9B55
#>  █ #FFFFFF
#>  █ #D461A6
#>  █ #A50062
#>  [sexuality]

Such palettes can be used anywhere a palette is needed, plots in particular. For example:

group <- rep(1:6, each = 10)
x <- group + .5 * rnorm(60)
y <- runif(60, 1, 1.5) * sqrt(group)
plot(x, y, pch = 19, col = palette_lgbtq("rainbow")[group], cex = 2)

If you wish to use these palettes with ggplot2, gglgbtq adapts these palettes to that particular use case.

Moreover, as a palette draws from the colors of a flag, a seq() method is provided that transforms a palette into a sequence so that e.g. a vertical bar with correct flag colors can be shown:

seq(palette_lgbtq("trans"))
#> transgender [seq 5]
#>  █ #55CDFC
#>  █ #F7A8B8
#>  █ #FFFFFF
#>  █ #F7A8B8
#>  █ #55CDFC

Gallery

Only a few most common palettes are included below. For the complete list, see palette gallery vignette.

plot(palette_lgbtq("rainbow"))

plot(palette_lgbtq("philadelphia"))

plot(palette_lgbtq("progress"))

plot(palette_lgbtq("lesbian"))

# In its original meaning of "gay men"
plot(palette_lgbtq("gay"))

plot(palette_lgbtq("bisexual"))

# Background added to avoid the "disappearance" of the white stripe
plot(palette_lgbtq("transgender"), background = "gray92")

plot(palette_lgbtq("asexual"))

plot(palette_lgbtq("nonbinary"))

plot(palette_lgbtq("intersex"))

About

R package that provides palette data for pride flags for use by {gglgbtq} and future projects.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages


Back | FazBrowse Home | New Git URL