fix: as_rgba_linear used wrong variant (#3192)

# Objective

as_rgba_linear used wrong variant

## Solution

Fixed it.
This commit is contained in:
Minghao Liu 2021-11-26 12:57:05 +00:00
parent f512c853d7
commit 73fd6a6f6f
2 changed files with 2 additions and 2 deletions

View file

@ -321,7 +321,7 @@ impl Color {
green, green,
blue, blue,
alpha, alpha,
} => Color::Rgba { } => Color::RgbaLinear {
red: red.nonlinear_to_linear_srgb(), red: red.nonlinear_to_linear_srgb(),
green: green.nonlinear_to_linear_srgb(), green: green.nonlinear_to_linear_srgb(),
blue: blue.nonlinear_to_linear_srgb(), blue: blue.nonlinear_to_linear_srgb(),

View file

@ -317,7 +317,7 @@ impl Color {
green, green,
blue, blue,
alpha, alpha,
} => Color::Rgba { } => Color::RgbaLinear {
red: red.nonlinear_to_linear_srgb(), red: red.nonlinear_to_linear_srgb(),
green: green.nonlinear_to_linear_srgb(), green: green.nonlinear_to_linear_srgb(),
blue: blue.nonlinear_to_linear_srgb(), blue: blue.nonlinear_to_linear_srgb(),