Title: | Access Color Names Using a Standardized Nomenclature |
---|---|
Description: | A curated set of colors that are called using a standardized syntax: saturation + hue + lightness. For example, "brightblue4" and "mutedred2". Functions exists to return individual colors by name or to build palettes across or within hues. Most functions allow you to visualize the palettes in addition to returning the desired hex codes. |
Authors: | Jake Riley [aut, cre] |
Maintainer: | Jake Riley <[email protected]> |
License: | GNU General Public License |
Version: | 0.1.2 |
Built: | 2025-02-21 04:15:43 UTC |
Source: | https://github.com/rjake/simplecolors |
This is a list of simplified color names
color_table
color_table
A data frame with 200 observations and 15 variables
hue on a 0-360 scale
lightness on a 0-1 scale
saturation on a 0-1 scale
the light value used in the package, 0-7
the base color name (hue), red, cyan, etc.
the first letter of the color, for building palettes
the saturation value used in the package, "bright", "muted", "dull", or blank ""
the color + the saturation, ex: "brightblue", "dullred"
the final unique name: color_sat + lightness, ex: "brightblue2", "mutedorange3"
hue on a 0-1 scale
the hex code of the color
the red of the RGB value
the green of the RGB value
the blue of the RGB value
for convenience as some HLS selection tools use a 0-255 scale
Specify color(s) by name
sc(...)
sc(...)
... |
the unique color names used in the package, ex: "brightred5", "grey4", "dullblue2" |
sc("violet4", "brightteal3")
sc("violet4", "brightteal3")
Generates a palette within across hues
sc_across(palette = "ROYGTBVPGy", light = 3, sat = "", return = NULL)
sc_across(palette = "ROYGTBVPGy", light = 3, sat = "", return = NULL)
palette |
the first letter of each hue to include |
light |
the lightness value to hold constant (1:7) |
sat |
the saturation value to hold constant ("bright", "muted", "dull", "") |
return |
defaults to returning hex codes but can also return a table or plot of the generated palette |
Other palettes:
sc_within()
sc_across(palette = "BO") sc_across(palette = "BO", sat = "bright", return = "table") sc_across(palette = "BO", sat = "bright", return = "plot") sc_across(palette = "RBTVPGy", light = 4, return = "plot")
sc_across(palette = "BO") sc_across(palette = "BO", sat = "bright", return = "table") sc_across(palette = "BO", sat = "bright", return = "plot") sc_across(palette = "RBTVPGy", light = 4, return = "plot")
Generates a palette within 1 hue
sc_within(hue, light = c(2:5), sat = "", return = NULL) sc_red(light = 2:5, sat = "", return = NULL) sc_orange(light = 2:5, sat = "", return = NULL) sc_yellow(light = 2:5, sat = "", return = NULL) sc_green(light = 2:5, sat = "", return = NULL) sc_teal(light = 2:5, sat = "", return = NULL) sc_blue(light = 2:5, sat = "", return = NULL) sc_violet(light = 2:5, sat = "", return = NULL) sc_pink(light = 2:5, sat = "", return = NULL) sc_grey(light = 2:5, sat = "", return = NULL)
sc_within(hue, light = c(2:5), sat = "", return = NULL) sc_red(light = 2:5, sat = "", return = NULL) sc_orange(light = 2:5, sat = "", return = NULL) sc_yellow(light = 2:5, sat = "", return = NULL) sc_green(light = 2:5, sat = "", return = NULL) sc_teal(light = 2:5, sat = "", return = NULL) sc_blue(light = 2:5, sat = "", return = NULL) sc_violet(light = 2:5, sat = "", return = NULL) sc_pink(light = 2:5, sat = "", return = NULL) sc_grey(light = 2:5, sat = "", return = NULL)
hue |
ex: "red", "blue", "violet" |
light |
the lightness of the color, ex: 1:5 |
sat |
the saturation of the color, ex: "bright", "muted", "dull" or "" (base) |
return |
defaults to returning hex codes but can also return a table or plot of the generated palette |
Other palettes:
sc_across()
sc_within("violet", 1:3) sc_within("violet", 1:5, "bright" , return = "table") sc_within("violet", 2:4, c("bright", "muted"), return = "plot")
sc_within("violet", 1:3) sc_within("violet", 1:5, "bright" , return = "table") sc_within("violet", 2:4, c("bright", "muted"), return = "plot")
Plots all available color values.
show_colors(labels = FALSE)
show_colors(labels = FALSE)
labels |
logical TRUE (default) will plot the color with color names, FALSE will plot the colors only |
Labels can be added by using the argument labels = TRUE
Returns a plot object
ggplot
show_colors()
show_colors()
The simplecolors package provides two categories of functions: color names and color palettes
The sc() function is the main way to access color names. Colors can be called by including them as comma separated string values. For example: sc("brightblue4", "mutedred2")
There are several functions that are prefixed with "sc_". These generate palettes of colors and can return hex codes (default), a table, or a plot showing the colors selected.
Maintainer: Jake Riley [email protected]
Useful links: