|
@@ -3,7 +3,7 @@ const metrics = {
|
|
|
option: "Geometric Difference (α)",
|
|
|
displayName: String.raw`\alpha`,
|
|
|
displayBody: p => String.raw`
|
|
|
- \sqrt{\sigma\left(${p}\right)^{2 - L\left(\vec{q}\right)} \Theta\left(${p}\right)^{L\left(\vec{q}\right)}}
|
|
|
+ \sqrt{\sigma\left(${p}\right)^{2 - \sqrt{L\left(\vec{q}\right)}} \Theta\left(${p}\right)^{\sqrt{L\left(\vec{q}\right)}}}
|
|
|
`,
|
|
|
evaluate: () => 0, // calculated below
|
|
|
},
|
|
@@ -108,11 +108,11 @@ const metrics = {
|
|
|
displayBody: p => String.raw`\text{chroma}\left(\vec{\mu}\left(${p}\right)\right)`,
|
|
|
evaluate: data => data.mu.chroma,
|
|
|
},
|
|
|
- chromaLight: {
|
|
|
- option: "Colorfulness (γ)",
|
|
|
+ intensity: {
|
|
|
+ option: "Visual Intensity (γ)",
|
|
|
displayName: String.raw`\gamma`,
|
|
|
- displayBody: p => String.raw`\sqrt{C\left(${p}\right) L\left(${p}\right)}`,
|
|
|
- evaluate: data => Math.sqrt(data.mu.lightness * data.mu.chroma),
|
|
|
+ displayBody: p => String.raw`\sqrt[3]{C\left(${p}\right) L\left(${p}\right)^2}`,
|
|
|
+ evaluate: data => Math.cbrt(data.mu.chroma * data.mu.lightness * data.mu.lightness)
|
|
|
},
|
|
|
};
|
|
|
|
|
@@ -122,6 +122,7 @@ const applyMetrics = (data, target) => {
|
|
|
.map(([name, metric]) => [name, metric.evaluate(data, target)])
|
|
|
);
|
|
|
// rearranges to geometric mean of sigma and bigTheta
|
|
|
- scores.alpha = Math.sqrt(Math.pow(scores.sigma, 2 - target.lightness) * Math.pow(scores.bigTheta, target.lightness));
|
|
|
+ const power = Math.sqrt(target.lightness)
|
|
|
+ scores.alpha = Math.sqrt(Math.pow(scores.sigma, 2 - power) * Math.pow(scores.bigTheta, power));
|
|
|
return scores;
|
|
|
};
|