Learn R Programming

thisplot (version 0.3.1)

get_colors: Get colors from Chinese colors dataset or palettes

Description

Search for colors in the Chinese colors dataset and all available palettes. This function can search by palette names, color names (pinyin or Chinese), numbers, or hex codes. It automatically searches in all palettes and reports which palette(s) contain the found colors.

Usage

get_colors(..., palettes = NULL)

Value

A data frame with class colors containing matching color information. The result is automatically printed using print.colors().

Arguments

...

One or more search values. Can be palette names, color names (pinyin or Chinese), numbers, or hex codes. If NULL, using all Chinese colors.

palettes

Optional. A named list of palettes to search in. If NULL (default), searches in all available palettes.

See Also

chinese_colors for the dataset of Chinese traditional colors. get_chinese_palettes for getting Chinese color palettes. ChineseColors for the ChineseColors object.

Examples

Run this code
get_colors("Paired")

get_colors("#FF7F00")

get_colors("pinlan")
get_colors(44)
get_colors("#2B73AF")

get_colors("cyan", palettes = "ChineseSet64")

Run the code above in your browser using DataLab