修正shade scale反算。
This commit is contained in:
parent
3ad5babacb
commit
67aca6926f
|
@ -42,17 +42,17 @@ impl MixReversing {
|
|||
let r_factor = if basic_color.red == 0.0 {
|
||||
0.0
|
||||
} else {
|
||||
(basic_color.red - mixed_result.red) / (0.0 - basic_color.red)
|
||||
(mixed_result.red - basic_color.red) / (0.0 - basic_color.red)
|
||||
};
|
||||
let g_factor = if basic_color.green == 0.0 {
|
||||
0.0
|
||||
} else {
|
||||
(basic_color.green - mixed_result.green) / (0.0 - basic_color.green)
|
||||
(mixed_result.green - basic_color.green) / (0.0 - basic_color.green)
|
||||
};
|
||||
let b_factor = if basic_color.blue == 0.0 {
|
||||
0.0
|
||||
} else {
|
||||
(basic_color.blue - mixed_result.blue) / (0.0 - basic_color.blue)
|
||||
(mixed_result.blue - basic_color.blue) / (0.0 - basic_color.blue)
|
||||
};
|
||||
let average = (r_factor + g_factor + b_factor) / 3.0;
|
||||
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user