调整HCT的相对颜色分析计算。
This commit is contained in:
parent
e90e88954a
commit
4ba51e018d
|
@ -41,7 +41,7 @@ impl ColorDifference for Cam16Jch<f32> {
|
||||||
0.0
|
0.0
|
||||||
} else {
|
} else {
|
||||||
(other.hue.into_positive_degrees() - self.hue.into_positive_degrees())
|
(other.hue.into_positive_degrees() - self.hue.into_positive_degrees())
|
||||||
/ (1.0 - self.hue.into_positive_degrees())
|
/ (360.0 - self.hue.into_positive_degrees())
|
||||||
};
|
};
|
||||||
let chroma = if self.chroma == 0.0 {
|
let chroma = if self.chroma == 0.0 {
|
||||||
0.0
|
0.0
|
||||||
|
@ -51,7 +51,7 @@ impl ColorDifference for Cam16Jch<f32> {
|
||||||
let lightness = if self.lightness == 0.0 {
|
let lightness = if self.lightness == 0.0 {
|
||||||
0.0
|
0.0
|
||||||
} else {
|
} else {
|
||||||
(other.lightness - self.lightness) / self.lightness
|
(other.lightness - self.lightness) / (100.0 - self.lightness)
|
||||||
};
|
};
|
||||||
|
|
||||||
HctDiffference {
|
HctDiffference {
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user