Skip to content

Colors are swapped on platforms that default to ARGB instead of BRGA #4647

@ssharks

Description

@ssharks

Issue:
I'm using the heatmap building in Blazor. If I use a specific heatmap, the colormap seems to be swapped.

If I use the Haline color map I expect a dark blue to yellow color map, although it appears as red to light blue.
Looking at the colors:

The the light blue has a hex value of #96EEFA
In decimal: 150 red 238 green 250 blue
If I swap the hex to #EEFA96
In decimal: 238 green 250 blue 150 red
This is light yellow

It also appears to be with other color maps.

ScottPlot Version:
5.0.47
.NET 9.0
SkiaSharp.Views.Blazor 3.118.0-preview.2.3

Code Sample:

var myPlot = BlazorPlot.Plot;
var hm = myPlot.Add.Heatmap(data);
hm.Colormap = new ScottPlot.Colormaps.Haline();
myPlot.Add.ColorBar(hm);

The heatmap with ScottPlot.Colormaps.Haline().Reverse():
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions