Skip to content

Commit

Permalink
added "rose_pine" and "rose_pine_dawn" (#72)
Browse files Browse the repository at this point in the history
* rose-pine

* Update README.md with images

* added it to the readme list
  • Loading branch information
BaerLKR committed May 27, 2024
1 parent f605892 commit 0f1e8fa
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 1 deletion.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ Currently the following themes are available:
- `:mute`
- `:dao`
- `:dracula`
- `:rose_pine`
- `:rose_pine_dawn`


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

### `:rose_pine`
![theme_rose_pine](https://github.com/BaerLKR/PlotThemes.jl/assets/83340886/30c869e5-2b90-405a-bc49-cf4ef3c43d75)

### `:rose_pine_dawn`
![theme_rose_pine_dawn](https://github.com/BaerLKR/PlotThemes.jl/assets/83340886/e30c0b46-1be3-49f5-afc5-ceede0b0c27d)

## Contributing
A theme specifies default values for different Plots [attributes](https://docs.juliaplots.org/stable/attributes/).
At the moment these are typically colors, palettes and colorgradients, but any Plots attribute can be controlled by a theme in general.
Expand Down
6 changes: 5 additions & 1 deletion src/PlotThemes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ include("gruvbox.jl")
include("sheet.jl")
include("dao.jl")
include("dracula.jl")
include("rose_pine.jl")


const _themes = Dict{Symbol, PlotTheme}([
Expand All @@ -67,7 +68,10 @@ const _themes = Dict{Symbol, PlotTheme}([
:juno => _juno,
:lime => _lime,
:orange => _orange,
:dracula => _dracula
:dracula => _dracula,
:rose_pine => _rose_pine,
:rose_pine_dawn => _rose_pine_dawn

])


Expand Down
46 changes: 46 additions & 0 deletions src/rose_pine.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# https://rosepinetheme.com
const rose_pine_palette = [
colorant"#524f67", # Highlight High
colorant"#31748f", # pine
colorant"#9ccfd8", # foam
colorant"#ebbcba", # rose
colorant"#f6c177", # gold
colorant"#eb6f92", # love
colorant"#c4a7e7", # Iris
]

const rose_pine_bg = colorant"#191724"

const _rose_pine = PlotTheme(Dict([
:bg => rose_pine_bg,
:bginside => colorant"#1f1d2e",
:fg => colorant"#e0def4",
:fgtext => colorant"#e0def4",
:fgguide => colorant"#e0def4",
:fglegend => colorant"#e0def4",
:palette => expand_palette(rose_pine_bg, rose_pine_palette),
:colorgradient => cgrad(rose_pine_palette)])
)

const rose_pine_dawn_palette = [
colorant"#907aa9", # Iris
colorant"#286983", # pine
colorant"#56949f", # foam
colorant"#cecacd", # Highlight High
colorant"#ea9d34", # gold
colorant"#d7827e", # rose
colorant"#b4637a", # love
]

const rose_pine_dawn_bg = colorant"#faf4ed"

const _rose_pine_dawn = PlotTheme(Dict([
:bg => rose_pine_dawn_bg,
:bginside => colorant"#fffaf3",
:fg => colorant"#575279",
:fgtext => colorant"#575279",
:fgguide => colorant"#575279",
:fglegend => colorant"#575279",
:palette => expand_palette(rose_pine_dawn_bg, rose_pine_dawn_palette),
:colorgradient => cgrad(rose_pine_dawn_palette)])
)

0 comments on commit 0f1e8fa

Please sign in to comment.