Skip to content

Commit 0f1e8fa

Browse files
authored
added "rose_pine" and "rose_pine_dawn" (#72)
* rose-pine * Update README.md with images * added it to the readme list
1 parent f605892 commit 0f1e8fa

File tree

3 files changed

+59
-1
lines changed

3 files changed

+59
-1
lines changed

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Currently the following themes are available:
3131
- `:mute`
3232
- `:dao`
3333
- `:dracula`
34+
- `:rose_pine`
35+
- `:rose_pine_dawn`
3436

3537

3638
When using Plots, a theme can be set using the `theme` function:
@@ -96,6 +98,12 @@ Themes can be previewed using `Plots.showtheme(thm::Symbol)`:
9698
### `:dracula`
9799
![theme_dracula](https://user-images.githubusercontent.com/64332767/136754217-31d4348a-c873-4496-8b66-905e4d8a7e36.png)
98100

101+
### `:rose_pine`
102+
![theme_rose_pine](https://github.com/BaerLKR/PlotThemes.jl/assets/83340886/30c869e5-2b90-405a-bc49-cf4ef3c43d75)
103+
104+
### `:rose_pine_dawn`
105+
![theme_rose_pine_dawn](https://github.com/BaerLKR/PlotThemes.jl/assets/83340886/e30c0b46-1be3-49f5-afc5-ceede0b0c27d)
106+
99107
## Contributing
100108
A theme specifies default values for different Plots [attributes](https://docs.juliaplots.org/stable/attributes/).
101109
At the moment these are typically colors, palettes and colorgradients, but any Plots attribute can be controlled by a theme in general.

src/PlotThemes.jl

+5-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ include("gruvbox.jl")
4747
include("sheet.jl")
4848
include("dao.jl")
4949
include("dracula.jl")
50+
include("rose_pine.jl")
5051

5152

5253
const _themes = Dict{Symbol, PlotTheme}([
@@ -67,7 +68,10 @@ const _themes = Dict{Symbol, PlotTheme}([
6768
:juno => _juno,
6869
:lime => _lime,
6970
:orange => _orange,
70-
:dracula => _dracula
71+
:dracula => _dracula,
72+
:rose_pine => _rose_pine,
73+
:rose_pine_dawn => _rose_pine_dawn
74+
7175
])
7276

7377

src/rose_pine.jl

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# https://rosepinetheme.com
2+
const rose_pine_palette = [
3+
colorant"#524f67", # Highlight High
4+
colorant"#31748f", # pine
5+
colorant"#9ccfd8", # foam
6+
colorant"#ebbcba", # rose
7+
colorant"#f6c177", # gold
8+
colorant"#eb6f92", # love
9+
colorant"#c4a7e7", # Iris
10+
]
11+
12+
const rose_pine_bg = colorant"#191724"
13+
14+
const _rose_pine = PlotTheme(Dict([
15+
:bg => rose_pine_bg,
16+
:bginside => colorant"#1f1d2e",
17+
:fg => colorant"#e0def4",
18+
:fgtext => colorant"#e0def4",
19+
:fgguide => colorant"#e0def4",
20+
:fglegend => colorant"#e0def4",
21+
:palette => expand_palette(rose_pine_bg, rose_pine_palette),
22+
:colorgradient => cgrad(rose_pine_palette)])
23+
)
24+
25+
const rose_pine_dawn_palette = [
26+
colorant"#907aa9", # Iris
27+
colorant"#286983", # pine
28+
colorant"#56949f", # foam
29+
colorant"#cecacd", # Highlight High
30+
colorant"#ea9d34", # gold
31+
colorant"#d7827e", # rose
32+
colorant"#b4637a", # love
33+
]
34+
35+
const rose_pine_dawn_bg = colorant"#faf4ed"
36+
37+
const _rose_pine_dawn = PlotTheme(Dict([
38+
:bg => rose_pine_dawn_bg,
39+
:bginside => colorant"#fffaf3",
40+
:fg => colorant"#575279",
41+
:fgtext => colorant"#575279",
42+
:fgguide => colorant"#575279",
43+
:fglegend => colorant"#575279",
44+
:palette => expand_palette(rose_pine_dawn_bg, rose_pine_dawn_palette),
45+
:colorgradient => cgrad(rose_pine_dawn_palette)])
46+
)

0 commit comments

Comments
 (0)