Fix PlayerColorRemap expecting colors in linear space
PlayerColorRemap expected colors in linear space yet we provided them in gamma. We fix this by instead expecting gamma space colors and then converting them into linear space ourselves.
This commit is contained in:
@@ -52,9 +52,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
public void LoadPalettes(WorldRenderer wr)
|
||||
{
|
||||
var (_, h, s, _) = info.Color.ToAhsv();
|
||||
|
||||
var remap = new PlayerColorRemap(info.RemapIndex.Length == 0 ? Enumerable.Range(0, 256).ToArray() : info.RemapIndex, h, s);
|
||||
var remap = new PlayerColorRemap(info.RemapIndex.Length == 0 ? Enumerable.Range(0, 256).ToArray() : info.RemapIndex, info.Color);
|
||||
wr.AddPalette(info.Name, new ImmutablePalette(wr.Palette(info.Base).Palette, remap), info.AllowModifiers);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user