Skip to content

Commit

Permalink
update oklab formula
Browse files Browse the repository at this point in the history
  • Loading branch information
mazznoer committed May 6, 2023
1 parent f858a64 commit a0d7cc4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions colorparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ func FromOklab(l, a, b, alpha float64) Color {
m_ := math.Pow(l-0.1055613458*a-0.0638541728*b, 3)
s_ := math.Pow(l-0.0894841775*a-1.2914855480*b, 3)

R := 4.0767245293*l_ - 3.3072168827*m_ + 0.2307590544*s_
G := -1.2681437731*l_ + 2.6093323231*m_ - 0.3411344290*s_
B := -0.0041119885*l_ - 0.7034763098*m_ + 1.7068625689*s_
R := 4.0767416621*l_ - 3.3077115913*m_ + 0.2309699292*s_
G := -1.2684380046*l_ + 2.6097574011*m_ - 0.3413193965*s_
B := -0.0041960863*l_ - 0.7034186147*m_ + 1.7076147010*s_

return FromLinearRGB(R, G, B, alpha)
}
Expand Down

0 comments on commit a0d7cc4

Please sign in to comment.