File tree 1 file changed +6
-6
lines changed
crates/bevy_render/src/color
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -153,9 +153,9 @@ impl LchRepresentation {
153
153
let z = zr * Self :: D65_WHITE_Z ;
154
154
155
155
// XYZ to sRGB http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_RGB.html
156
- let red = x * 3.2404541621141045 + y * -1.5371385127977166 + z * -0.498531409556016 ;
157
- let green = x * -0.9692660305051868 + y * 1.8760108454466942 + z * 0.041556017530349834 ;
158
- let blue = x * 0.055643430959114726 + y * -0.2040259135167538 + z * 1.0572251882231791 ;
156
+ let red = x * 3.2404542 + y * -1.5371385 + z * -0.4985314 ;
157
+ let green = x * -0.969266 + y * 1.8760108 + z * 0.041556 ;
158
+ let blue = x * 0.0556434 + y * -0.2040259 + z * 1.0572252 ;
159
159
160
160
[
161
161
red. linear_to_nonlinear_srgb ( ) . max ( 0.0 ) . min ( 1.0 ) ,
@@ -172,9 +172,9 @@ impl LchRepresentation {
172
172
let green = green. nonlinear_to_linear_srgb ( ) ;
173
173
let blue = blue. nonlinear_to_linear_srgb ( ) ;
174
174
175
- let x = red * 0.4124564390896922 + green * 0.357576077643909 + blue * 0.18043748326639894 ;
176
- let y = red * 0.21267285140562253 + green * 0.715152155287818 + blue * 0.07217499330655958 ;
177
- let z = red * 0.0193338955823293 + green * 0.11919202588130297 + blue * 0.9503040785363679 ;
175
+ let x = red * 0.4124564 + green * 0.3575761 + blue * 0.1804375 ;
176
+ let y = red * 0.2126729 + green * 0.7151522 + blue * 0.072175 ;
177
+ let z = red * 0.0193339 + green * 0.119192 + blue * 0.9503041 ;
178
178
179
179
// XYZ to Lab http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_Lab.html
180
180
let xr = x / Self :: D65_WHITE_X ;
You can’t perform that action at this time.
0 commit comments