diff --git a/src/colormaps.jl b/src/colormaps.jl index 8026ca81..b9dbeaa9 100644 --- a/src/colormaps.jl +++ b/src/colormaps.jl @@ -224,7 +224,7 @@ function diverging_palette(h1, N2 = Int(max(n-N1, 1)) pal1 = sequential_palette(h1, N1+1, w=w, d=d1, c=c, s=s, b=b, wcolor=wcolor, dcolor=dcolor1, logscale=logscale) - pal1 = flipdim(pal1, 1) + pal1 = reverse(pal1; dims=1) pal2 = sequential_palette(h2, N2+1, w=w, d=d2, c=c, s=s, b=b, wcolor=wcolor, dcolor=dcolor2, logscale=logscale) diff --git a/test/colormaps.jl b/test/colormaps.jl new file mode 100644 index 00000000..35e5a6c4 --- /dev/null +++ b/test/colormaps.jl @@ -0,0 +1,3 @@ +@testset "Colormaps" begin + @test length(colormap("RdBu", 100)) == 100 +end diff --git a/test/runtests.jl b/test/runtests.jl index e2ee61ac..67e478a0 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -3,6 +3,7 @@ using Colors, Test include("algorithms.jl") include("conversion.jl") +include("colormaps.jl") include("colordiff.jl") include("din99.jl") include("utilities.jl")