]> git.smokeofanarchy.ru Git - space-station-14.git/commit
Fix ColorExtensions math (#41717)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Mon, 15 Dec 2025 02:07:32 +0000 (03:07 +0100)
committerGitHub <noreply@github.com>
Mon, 15 Dec 2025 02:07:32 +0000 (03:07 +0100)
commita0817cdbb3e9a8925d9399ff9104ee1c1de2289b
treecc7d3553d256fd1e87ecb5c6e37b54b9e1ed9604
parent9206ad9a64737c1899b09fb9c7da5a927472e766
Fix ColorExtensions math (#41717)

All of this was doing sRGB -> OkLAB conversions without linearizing the sRGB first, so it was broken. I could have sworn I pointed this out in review but I guess that got lost.

Also, add a gamut clipping step since we have out-of-gamut colors and I don't want random negative values causing weird nightmare bugs somewhere. Shouldn't change anything in regular rendering.
Content.Client/Stylesheets/Colorspace/ColorExtensions.cs