-
-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sRGB Transformations #283
sRGB Transformations #283
Conversation
Currently I'm aiming for this sort of syntax: local Oklab = Fusion.Oklab
local bgColour = Spring(Computed(function(use)
return if use(isRed) then Oklab.new(0.600, 0.483, 0.128) else Oklab.new(0.600, −0.100, −0.490)
end), 20, 0.5)
local frame = New "Frame" {
BackgroundColor3 = Computed(function(use) return use(bgColour):toSRGB() end)
}
|
New syntax for colour manipulation is outside the scope of the linked issue and should really be discussed elsewhere, please stick to the existing API surface for now. This is an internal bug where our existing contract with the user isn't being upheld - fixing this does not require changing the contract, it only requires changing our internal code to conform to it as we originally promised to users. Other than that, I'd be happy to accept a simpler version that implements the appropriate conversions to ensure Color3 is interpreted as sRGB rather than linear RGB. |
Okay I've reverted back to a simpler implementation that focuses on the srgb <-> oklab conversion. |
PR resolves #257. My goal is to start off by implementing the basic sRGB transfers. I think more discussion is needed to determine how to allow users to choose their own gamut.
My understanding of this is practically wrapping the Oklab to/from methods with sRGB conversions: