❝❞
June
The color matching R package written by my friends , everyone is welcome to use it and give valuable opinions.
Genshinpalette
Provides a series of color palettes, inspired by the original God color matching
package install
At present, the package can only be installed from GitHub, and it will be optimized and improved in the future. Please provide more suggestions and comments to help optimize and improve the package:
remotes::install_github("Schwarzeneggerjune/Genshinpalette",force = T)
usage
At present, there are only three simple functions in this package. get_character_name
The function can get the English name of the original god character, which can be used to extract the theme color of the corresponding character later. Genshinpalette
The function can extract the theme color of the corresponding character. Because the color extraction has a certain randomness, the current color matching may not be very beautiful and will be manually optimized and updated later. The function can simply display the colors in the palette display_colors
.
char_name=get_character_name(Country = "All")#Country可以是原神中各国家
head(char_name,10)#若出现乱码请检查系统编码格式是否为UTF-8
ALBEDO ALOY AMBER BARBARA BENNETT DIONA DILUC FISCHL KAEYA KLEE
"阿贝多" "埃洛伊" "安柏" "芭芭拉" "班尼特" "迪奥娜" "迪卢克" "菲谢尔" "凯亚" "可莉"
Genshinpalette('BARBARA',#角色名称
6)#所需颜色个数,默认为6
[1] "#2C3350" "#727782" "#9C9997" "#BEB8BA" "#CDC2B9" "#F4EFEA"
display_colors('FISCHL')
library(ggplot2)
data("diamonds")
ggplot(
subset(diamonds, carat >= 2.2),
aes(x = table, y = price, colour = cut)
) +
geom_point(alpha = 0.7) +
geom_smooth(method = "loess", alpha = 0.05, size = 1, span = 1) +
theme_bw()+
scale_color_manual(values = Genshinpalette('JEAN'))
ggplot(
subset(diamonds, carat > 2.3 & depth > 10 & depth < 100),
aes(x = depth, fill = cut)
) +
geom_histogram(colour = "black", binwidth = 1, position = "dodge") +
theme_bw()+
scale_fill_manual(values = Genshinpalette('GANYU'))
palette display
previous content
How to draw this picture | Correlation Analysis Lollipop Chart
(Free tutorial + code collection) | Follow Cell to learn drawing series collection
R actual combat | Lasso regression model establishment and variable screening
Follow NC to map | Advanced interaction network diagram (protein + enrichment pathway) (Cytoscape)
R actual combat | Add a circle to the clustering (ggunchull)