| Title: | A Collection of Color Palettes Inspired by Persian Carpets. |
|---|---|
| Description: | This package provides a collection of color palettes inspired by the intricate designs and rich colors of Persian carpets. |
| Authors: | Jan Simson [aut, cre], Yeganeh Khazaei [aut] |
| Maintainer: | Jan Simson <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-06-01 06:56:35 UTC |
| Source: | https://github.com/jan-yegi/peRsian |
A dataset containing measurements of enamel microstructure parameters from different enamel types, including human enamel and shark enamel, with and without fluoride treatment.
enamelenamel
A data frame with 3 rows and 5 variables:
Type of enamel sample (character)
Mean crystallite size in micrometers (numeric)
Standard deviation of crystallite size in micrometers (numeric)
Mean volume percentage in vol% μm (numeric)
Standard deviation of volume percentage in vol% μm (numeric)
The dataset includes three enamel types:
Human enamel (untreated)
Shark enamel
Human enamel with daily rinse treatment using 0.2% NaF (sodium fluoride)
Ögaard, B., Rölla, G., Ruben, J., Dijkman, T., & Arends, J. (1988). Microradiographic study of demineralization of shark enamel in a human caries model. European Journal of Oral Sciences, 96(3), 209-211. https://doi.org/10.1111/j.1600-0722.1988.tb01545.x
This is a collection of color palettes based on artifacts of persian art.
persian_palette( name, n, direction = c(1, -1), selection = c("sequential", "evenly") )persian_palette( name, n, direction = c(1, -1), selection = c("sequential", "evenly") )
name |
Name of desired palette. |
n |
Number of colors desired. Empty or -1 for all colors. |
direction |
Sets the order of colors in the palette. If 1, the default, colors are as output in the palette. If -1, the order of colors is reversed. |
selection |
For discrete palettes, either "sequential" (default, selects adjacent colors) or "evenly" (maximizes distance between selected colors). |
A vector of colours.
A list of color palettes inspired by Persian art and artifacts. Each palette contains a vector of hex color codes.
persian_palettespersian_palettes
A named list of character vectors containing hex color codes
persian_palette to generate palettes and persian_palettes_colorblind_safe for colorblind-safe options.
A subset of Persian color palettes that are colorblind-safe.
These palettes have been tested for accessibility, see vignette("check-colors").
persian_palettes_colorblind_safepersian_palettes_colorblind_safe
A named list of character vectors containing hex color codes
Apply a continuous Persian color palette gradient to the color aesthetic in ggplot2.
scale_color_persian_c(name, direction = 1, n = 2, selection = "evenly", ...) scale_colour_persian_c(name, direction = 1, n = 2, selection = "evenly", ...)scale_color_persian_c(name, direction = 1, n = 2, selection = "evenly", ...) scale_colour_persian_c(name, direction = 1, n = 2, selection = "evenly", ...)
name |
Name of the Persian palette to use. Options include:
"munich", "fery", "tehran", "leyli", "tabriz", "hooshang", "reyhaneh",
"floral", "hamburg", "pooran", "abbas", "isfahan", "berlin"
See |
direction |
Sets the order of colors in the scale. If -1, the order of colors is reversed. |
n |
Number of colors desired. Empty or -1 for all colors. |
selection |
For discrete palettes, either "sequential" (default, selects adjacent colors) or "evenly" (maximizes distance between selected colors). |
... |
Additional arguments passed to |
A ggplot2 scale object.
library(ggplot2) ggplot(enamel, aes(x = group, y = z_mean, color = z_sd)) + geom_segment(aes(x = group, xend = group, y = 0, yend = z_mean), linewidth = 1) + geom_point(size = 5) + scale_color_persian_c("isfahan")library(ggplot2) ggplot(enamel, aes(x = group, y = z_mean, color = z_sd)) + geom_segment(aes(x = group, xend = group, y = 0, yend = z_mean), linewidth = 1) + geom_point(size = 5) + scale_color_persian_c("isfahan")
Apply a discrete Persian color palette to the color aesthetic in ggplot2.
scale_color_persian_d(name, direction = 1, ...) scale_color_persian(name, direction = 1, ...) scale_colour_persian(name, direction = 1, ...) scale_colour_persian_d(name, direction = 1, ...)scale_color_persian_d(name, direction = 1, ...) scale_color_persian(name, direction = 1, ...) scale_colour_persian(name, direction = 1, ...) scale_colour_persian_d(name, direction = 1, ...)
name |
Name of the Persian palette to use. Options include:
"munich", "fery", "tehran", "leyli", "tabriz", "hooshang", "reyhaneh",
"floral", "hamburg", "pooran", "abbas", "isfahan", "berlin"
See |
direction |
Sets the order of colors in the scale. If -1, the order of colors is reversed. |
... |
Additional arguments passed to |
A ggplot2 scale object.
library(ggplot2) ggplot(enamel, aes(x = group, y = ld_mean, color = group)) + geom_segment(aes(x = group, xend = group, y = 0, yend = ld_mean), linewidth = 1) + geom_point(size = 4) + scale_color_persian_d("isfahan")library(ggplot2) ggplot(enamel, aes(x = group, y = ld_mean, color = group)) + geom_segment(aes(x = group, xend = group, y = 0, yend = ld_mean), linewidth = 1) + geom_point(size = 4) + scale_color_persian_d("isfahan")
Apply a continuous Persian color palette gradient to the fill aesthetic in ggplot2.
scale_fill_persian_c(name, direction = 1, n = 2, selection = "evenly", ...)scale_fill_persian_c(name, direction = 1, n = 2, selection = "evenly", ...)
name |
Name of the Persian palette to use. Options include:
"munich", "fery", "tehran", "leyli", "tabriz", "hooshang", "reyhaneh",
"floral", "hamburg", "pooran", "abbas", "isfahan", "berlin"
See |
direction |
Sets the order of colors in the scale. If -1, the order of colors is reversed. |
n |
Number of colors desired. Empty or -1 for all colors. |
selection |
For discrete palettes, either "sequential" (default, selects adjacent colors) or "evenly" (maximizes distance between selected colors). |
... |
Additional arguments passed to |
A ggplot2 scale object.
library(ggplot2) ggplot(enamel, aes(x = group, y = ld_mean, fill = ld_sd)) + geom_col() + scale_fill_persian_c("fery")library(ggplot2) ggplot(enamel, aes(x = group, y = ld_mean, fill = ld_sd)) + geom_col() + scale_fill_persian_c("fery")
Apply a discrete Persian color palette to the fill aesthetic in ggplot2.
scale_fill_persian_d(name, direction = 1, ...) scale_fill_persian(name, direction = 1, ...)scale_fill_persian_d(name, direction = 1, ...) scale_fill_persian(name, direction = 1, ...)
name |
Name of the Persian palette to use. Options include:
"munich", "fery", "tehran", "leyli", "tabriz", "hooshang", "reyhaneh",
"floral", "hamburg", "pooran", "abbas", "isfahan", "berlin"
See |
direction |
Sets the order of colors in the scale. If -1, the order of colors is reversed. |
... |
Additional arguments passed to |
A ggplot2 scale object.
library(ggplot2) ggplot(enamel, aes(x = group, y = ld_mean, fill = group)) + geom_col() + scale_fill_persian_d("leyli")library(ggplot2) ggplot(enamel, aes(x = group, y = ld_mean, fill = group)) + geom_col() + scale_fill_persian_d("leyli")