@@ -187,16 +187,16 @@ struct [[nodiscard]] Color {
187187
188188 _FORCE_INLINE_ Color srgb_to_linear () const {
189189 return Color (
190- r < 0 .04045f ? r * (1 .0f / 12 .92f ) : Math::pow (( r + 0 .055f ) * (float )( 1.0 / (1.0 + 0.055 )), 2 .4f ),
191- g < 0 .04045f ? g * (1 .0f / 12 .92f ) : Math::pow (( g + 0 .055f ) * (float )( 1.0 / (1.0 + 0.055 )), 2 .4f ),
192- b < 0 .04045f ? b * (1 .0f / 12 .92f ) : Math::pow (( b + 0 .055f ) * (float )( 1.0 / (1.0 + 0.055 )), 2 .4f ),
190+ r < 0 .04045f ? r * (1 .0f / 12 .92f ) : Math::pow (float (( r + 0.055 ) * (1.0 / (1.0 + 0.055 ) )), 2 .4f ),
191+ g < 0 .04045f ? g * (1 .0f / 12 .92f ) : Math::pow (float (( g + 0.055 ) * (1.0 / (1.0 + 0.055 ) )), 2 .4f ),
192+ b < 0 .04045f ? b * (1 .0f / 12 .92f ) : Math::pow (float (( b + 0.055 ) * (1.0 / (1.0 + 0.055 ) )), 2 .4f ),
193193 a);
194194 }
195195 _FORCE_INLINE_ Color linear_to_srgb () const {
196196 return Color (
197- r < 0 .0031308f ? 12 .92f * r : (1 .0f + 0 .055f ) * Math::pow (r, 1 .0f / 2 .4f ) - 0 .055f ,
198- g < 0 .0031308f ? 12 .92f * g : (1 .0f + 0 .055f ) * Math::pow (g, 1 .0f / 2 .4f ) - 0 .055f ,
199- b < 0 .0031308f ? 12 .92f * b : (1 .0f + 0 .055f ) * Math::pow (b, 1 .0f / 2 .4f ) - 0 .055f , a);
197+ r < 0 .0031308f ? 12 .92f * r : (1.0 + 0.055 ) * Math::pow (r, 1 .0f / 2 .4f ) - 0.055 ,
198+ g < 0 .0031308f ? 12 .92f * g : (1.0 + 0.055 ) * Math::pow (g, 1 .0f / 2 .4f ) - 0.055 ,
199+ b < 0 .0031308f ? 12 .92f * b : (1.0 + 0.055 ) * Math::pow (b, 1 .0f / 2 .4f ) - 0.055 , a);
200200 }
201201
202202 static Color hex (uint32_t p_hex);
0 commit comments