Title: | American Politics-Inspired Color Palette Generator |
---|---|
Description: | A crisp, clean color palette generator inspired by American politics, with colors ranging from blue on the left to gray in the middle and red on the right. A variety of palettes allow for a range of applications from brief discrete scales (e.g., three colors for Democrats, Independents, and Republicans) to continuous interpolated arrays including dozens of shades graded from blue (left) to red (right). |
Authors: | Philip Waggoner [aut, cre] |
Maintainer: | Philip D. Waggoner <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.0 |
Built: | 2024-11-20 05:19:50 UTC |
Source: | https://github.com/pdwaggoner/amerika |
American politics-inspired color palettes
American politics-inspired color palettes
amerika color palette generator
amerika_palette("name", n, "type")
amerika_palette("name", n, "type")
name |
Name of the specific palette in quotation marks. The options are: |
n |
Number of colors to select from the palette. If null, then all colors in the palette are selected |
type |
Specify the type of color mapping, either "continuous" or "discrete" in quotation marks. Use "continuous" to include more colors than those in the palette. See |
A vector of colors
Karthik Ram and Hadley Wickham. 2015. wesanderson: a Wes Anderson palette generator. R package version 0.3.
# Display each palette amerika_palette("Republican") amerika_palette("Democrat") amerika_palette("Dem_Ind_Rep3") amerika_palette("Dem_Ind_Rep5") amerika_palette("Dem_Ind_Rep7") # Interpolating between existing colors based on the palettes using the "continuous" type amerika_palette(50, name = "Republican", type = "continuous") amerika_palette(50, name = "Democrat", type = "continuous") amerika_palette(50, name = "Dem_Ind_Rep3", type = "continuous") amerika_palette(50, name = "Dem_Ind_Rep5", type = "continuous") amerika_palette(50, name = "Dem_Ind_Rep7", type = "continuous")
# Display each palette amerika_palette("Republican") amerika_palette("Democrat") amerika_palette("Dem_Ind_Rep3") amerika_palette("Dem_Ind_Rep5") amerika_palette("Dem_Ind_Rep7") # Interpolating between existing colors based on the palettes using the "continuous" type amerika_palette(50, name = "Republican", type = "continuous") amerika_palette(50, name = "Democrat", type = "continuous") amerika_palette(50, name = "Dem_Ind_Rep3", type = "continuous") amerika_palette(50, name = "Dem_Ind_Rep5", type = "continuous") amerika_palette(50, name = "Dem_Ind_Rep7", type = "continuous")
Use amerika_palette
to produce desired color palette
amerika_palettes
amerika_palettes
An object of class list
of length 5.