View source: R/chinese_colors.R
| ChineseColors | R Documentation |
A color system based on Chinese traditional colors with 1058 colors.
ChineseColors()
A ChineseColors object.
Detailed information can be found in print.ChineseColors().
chinese_colors for the dataset of Chinese traditional colors. get_chinese_palettes for getting Chinese color palettes. visual_colors for visualizing any color vector. get_colors for searching colors in dataset and palettes.
cc <- ChineseColors()
cc
# Get a color by pinyin
get_colors("pinlan")
# By number
get_colors(44)
# By hex code
get_colors("#2B73AF")
# Multiple colors
get_colors("pinlan", "piao")
get_colors(91:100)
# Chinese names
cc$visual_colors(
title = "Chinese Traditional Colors",
name_type = "chinese"
)
# pinyin as names
cc$visual_colors(
loc_range = c(1, 120),
title = "Chinese Traditional Colors",
name_type = "pinyin"
)
# rgb as names
cc$visual_colors(
loc_range = c(1, 120),
title = "Colors with RGB values",
name_type = "rgb"
)
# hex as names
cc$visual_colors(
loc_range = c(1, 120),
title = "Colors with hex codes",
name_type = "hex"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.