Skip to content

Commit

Permalink
change default colors
Browse files Browse the repository at this point in the history
  • Loading branch information
BeastyBlacksmith committed Aug 29, 2024
1 parent af28622 commit 2a267cc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "PlotUtils"
uuid = "995b91a9-d308-5afd-9ec6-746e21dbc043"
version = "1.4.1"
version = "2.0.0"

[deps]
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
Expand Down
2 changes: 1 addition & 1 deletion src/PlotUtils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export optimize_ticks, optimize_datetime_ticks

include("ticks.jl")

const _default_colorscheme = generate_colorscheme()
const _default_colorscheme = ColorSchemes.colorscheme(:seaborn_colorblind)

if VERSION v"1.8.0"
@compile_workload begin
Expand Down
5 changes: 3 additions & 2 deletions src/colorschemes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function cgrad(
end

function cgrad(colors, args...; kwargs...)
colors :default && (colors = :inferno)
colors :default && (colors = DEFAULT_COLOR_GRADIENT[])
cgrad(get_colorscheme(colors), args...; kwargs...)
end

Expand Down Expand Up @@ -335,7 +335,7 @@ is_colorscheme(sym) =
sym keys(COLORSCHEME_ALIASES) ||
sym keys(MISC_COLORSCHEMES)

const DEFAULT_COLOR_GRADIENT = Ref(cgrad(ColorSchemes.colorschemes[:inferno]))
const DEFAULT_COLOR_GRADIENT = Ref(cgrad(ColorSchemes.colorschemes[:haline]))

## Compat

Expand Down Expand Up @@ -422,6 +422,7 @@ const TEST_COLORS = RGBA{Float64}[
]

const MISC_COLORSCHEMES = Dict{Symbol,ColorScheme}(
:default => generate_colorscheme(),
:blues => ColorScheme(RGBA{Float64}[colorant"lightblue", colorant"darkblue"]),
:reds => ColorScheme(RGBA{Float64}[colorant"lightpink", colorant"darkred"]),
:greens => ColorScheme(RGBA{Float64}[colorant"lightgreen", colorant"darkgreen"]),
Expand Down

0 comments on commit 2a267cc

Please sign in to comment.