Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
cxli233 authored Nov 25, 2024
1 parent 9f595ce commit 5698b82
Showing 1 changed file with 199 additions and 1 deletion.
200 changes: 199 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,200 @@
# Color_palette_by_cxli
# Color palettes by cxLi
A collection of color palettes inspired by plants and pop culture.

* Author: Chenxin Li, Ph.D.,
Assistant Research Scientist at Department of Crop & Soil Sciences and Center for Applied Genetic Technologies,
University of Georgia.
* Contact: [[email protected]]([email protected]) | [@chenxinli2.bsky.social](https://bsky.app/profile/chenxinli2.bsky.social)

![Display all color sets](https://github.com/cxli233/Color_palette_by_cxli/blob/main/Results/show_all.png)

Attempts have been made to produce palettes that are friendly to deuteranopia, the most common type of red/green color blindness.
Please cite/acknowledge this repository if used.

Please also explore other palette collections.

* [viridis](https://github.com/sjmgarnier/viridis)
* [RcolorBrewer](https://r-graph-gallery.com/38-rcolorbrewers-palettes.html)
* [rcartocolor](https://github.com/Nowosad/rcartocolor)

# Table of contents
1. Wisteria
2. Higanbana (red spider lily)
3. Geissorhiza radians
4. Bocchi the Rock!
5. Frieren 1
6. Frieren 2 - the field of flower
7. Frieren 3 - that scene
8. Ubel
9. Yu-Gi-Oh - "the Three Egyptian Gods"
10. Example usage
11. Summary

# Wisteria
![wisteria](https://github.com/cxli233/Color_palette_by_cxli/blob/main/Data/wisteria_home_depot.jpg)

Wisteria is a climbing plant with beautiful flowers (photo credit: Home Depot).

```r
wisteria <- c("#A6A6A6", "#CDAA7D", "#EEE685", "#FFBBFF", "#D1EEEE", "#6495ED", "#6959CD")
```

![wisteria color set](https://github.com/cxli233/Color_palette_by_cxli/blob/main/Results/wisteria.png)

# Higanbana (red spider lily)
![Red spider lily](https://github.com/cxli233/Color_palette_by_cxli/blob/main/Data/Red_Spider_Lily----Lycoris_radiata.jpg)

(Photo credit: [Wikipedia](https://en.wikipedia.org/wiki/Lycoris_radiata))

```r
higanbana <- c("#FED731", "#FDA888", "#EF5960", "#E70F25", "#8C030B", "#450110", "#1F0A0A")
```

![higanbana color set](https://github.com/cxli233/Color_palette_by_cxli/blob/main/Results/higanbana.png)

# Geissorhiza radians
![Geissorhiza radians](https://github.com/cxli233/Color_palette_by_cxli/blob/main/Data/Darling_Wildflower_Reserve_-_Geissorhiza_radians_1.jpg)

(Photo credit: [Andreas Fleischmann](https://en.wikipedia.org/wiki/Geissorhiza_radians))

```r
gra <- c( "#200200", "#BF051E", "#FC3E57", "#E3C9EC", "#C29CE2", "#811ED0", "#36044A")
```

![gra color set](https://github.com/cxli233/Color_palette_by_cxli/blob/main/Results/Geissorhiza_radians.png)

# Bocchi the Rock!
Bocchi the Rock! is about a teenager girl overcoming her debilitating social anxiety
while performing in a band as the guitarist.
It's extremely relatable (at least to me) but also utterly creative and expressive. I highly recommend.
[Clip from YouTube](https://www.youtube.com/watch?v=QjmnsAWGm8E&ab_channel=Crunchyroll)

![A bocchi the rock poster](https://github.com/cxli233/Color_palette_by_cxli/blob/main/Data/bochhi_the_rock.jpg)

(Photo credit: Bocchi the Rock! official website).

```r
bocchi <- c("#F2C9D5", "#B43E44", "#FADF92" , "#496496", "#282828", "#904869")
```

![bocchi color set](https://github.com/cxli233/Color_palette_by_cxli/blob/main/Results/bocchi.png)

# Frieren 1
Frieren Beyond Journey's End takes place in a fantasy world after the hero's party defeated the demon lord.
Frieren, the elven mage of the party, explores the concepts of time, lost, and emotions.
It has beautiful visuals and music, intriguing lore, well-written characters, and masterful story telling.
100% recommend. One of the best, if not the best, anime of recent years (as of 2024).

![Frieren laying in water looking up](https://raw.githubusercontent.com/cxli233/Color_palette_by_cxli/refs/heads/main/Data/Frieren-Beyond-Journeys-End-Cropped-93f4329.webp)

(Clipped from Season 1 Episode 1).

```r
frieren1<- c("#DFE1BC", "#90C6A7", "#3D646A", "#795862",
"#141313", "#E2E1E4", "#A49FB8", "#6A83A9")
```

![frieren color set 1](https://github.com/cxli233/Color_palette_by_cxli/blob/main/Results/frieren1.png)

# Frieren 2
![Frieren sitting in a field of flowers with a flower crown on her head](https://github.com/cxli233/Color_palette_by_cxli/blob/main/Data/frn-ep02.jpg)

(Clipped from Season 1 Episode 2).

```r
frieren2 <- c("#E6E2F1", "#F8E8E3",
"#F6D481", "#F5A556",
"#FB9FB9", "#C94D6C",
"#4F4E46")
```

![frieren color set 2](https://github.com/cxli233/Color_palette_by_cxli/blob/main/Results/frieren2.png)

# Frieren 3 - that scene!
If you have watched Frieren, you know which scene I am refering to.
If you haven't, I won't spoil it for you. Please go watch it. It's beautiful.

![That scene](https://github.com/cxli233/Color_palette_by_cxli/blob/main/Data/ThatScene_blurred.png)

(Clipped from Season 1 Episode 14).

```r
frieren3 <- c("#462D2E", "#BA8F7D", "#AB6B7A",
"#CB6B6E", "#E09DBD", "#47324E", "#FFD1BF")
```

![frieren color set 3](https://github.com/cxli233/Color_palette_by_cxli/blob/main/Results/frieren3.png)

# Ubel
Ubel is a character from Frieren Beyond Journey's End.

![Ubel looking around](https://raw.githubusercontent.com/cxli233/Color_palette_by_cxli/refs/heads/main/Data/ubel-looks-around-in-frieren.avif)

(Clipped from Season 1 Episode 17).

```r
ubel <- c("#C9BFE1", "#958AC3", "#433D64", "#110F09",
"#3A3E25", "#636B3C", "#A4AD72")
```

![ubel color set](https://github.com/cxli233/Color_palette_by_cxli/blob/main/Results/Ubel.png)

# Yu-Gi-Oh "the Three Egyptian Gods"
I consider [Yu-Gi-Oh](https://en.wikipedia.org/wiki/Yu-Gi-Oh!) to be a classic anime.
This color palette was inspired by "the Three Egyptian Gods".

![the Three Egyptian Gods](https://raw.githubusercontent.com/cxli233/Color_palette_by_cxli/refs/heads/main/Data/Yugioh222.webp)

```r
YGO <- c("#0E1118", "#DC383A", "#A90C1B", "#FED568", "#C48233", "#84C4EF", "#1D4564")
```

![YGO Gods color set](https://github.com/cxli233/Color_palette_by_cxli/blob/main/Results/YGO.png)

# Example usage
The easiest way to deploy the color sets is copying the hex. For example:
```r
wisteria <- c("#A6A6A6", "#CDAA7D", "#EEE685", "#FFBBFF", "#D1EEEE", "#6495ED", "#6959CD")
```
Then use `scale_fill_manual(values = wisteria)` or `scale_color_mannual(values = wisteria)`.

## Example 1
```r
frieren1<- c("#DFE1BC", "#90C6A7", "#3D646A", "#795862",
"#141313", "#E2E1E4", "#A49FB8", "#6A83A9")

datasets::ChickWeight %>%
filter(Time == 21) %>%
ggplot(aes(x = Diet, y = weight)) +
geom_point(position = position_jitter(seed = 666, width = 0.1),
shape = 21, color = "grey20",
aes(fill = Diet), size = 2.5, alpha = 0.8) +
scale_fill_manual(values = frieren1[c(1, 2, 3, 8)]) +
labs(title = "Effect of 4 diets on chicken growth") +
theme_classic()
```
![Example1](https://github.com/cxli233/Color_palette_by_cxli/blob/main/Results/example1.png)

Admittedly, some of the colors are two light.
One way to get around that is to use `shape = 21` within `geom_point()`, which specifies for hollow points.
Then specify `color = "grey20"`, which draws a dark grey outline for the points.
Finally, use `fill` instead of `color` to specify the internal colors of the geoms.
You can use the square bracket syntax `[]` to subset the color palette as well.

## Example 2
```r
YGO <- c("#0E1118", "#DC383A", "#A90C1B", "#FED568", "#C48233", "#84C4EF", "#1D4564")

datasets::ChickWeight %>%
ggplot(aes(x = Time, y = weight)) +
geom_smooth(aes(color = Diet), se = F)+
scale_color_manual(values = YGO[c(1, 3 , 5, 7)]) +
labs(title = "Effect of 4 diets on chicken growth") +
theme_bw()
```

![Example2](https://github.com/cxli233/Color_palette_by_cxli/blob/main/Results/example2.png)

# Summary
You can view the hex code of all color palettes in this collection [here](https://github.com/cxli233/Color_palette_by_cxli/blob/main/Results/all_palette_df.csv).

0 comments on commit 5698b82

Please sign in to comment.