|
@@ -4,9 +4,9 @@ const metrics = {
|
|
|
displayName: String.raw`\alpha`,
|
|
|
displayBody: p => String.raw`
|
|
|
\frac{
|
|
|
- \sigma\left(${p}\right)^{1 - (C\left(\left\{\vec{q}\right\}\right) - L\left(\left\{\vec{q}\right\}\right))}
|
|
|
+ \sigma\left(${p}\right)^{1 - C\left(\left\{\vec{q}\right\}\right) L\left(\left\{\vec{q}\right\}\right)}
|
|
|
}{
|
|
|
- \Theta\left(${p}\right)^{-1 - (C\left(\left\{\vec{q}\right\}\right) - L\left(\left\{\vec{q}\right\}\right))}
|
|
|
+ \Theta\left(${p}\right)^{-1 - C\left(\left\{\vec{q}\right\}\right) L\left(\left\{\vec{q}\right\}\right)}
|
|
|
}
|
|
|
`,
|
|
|
evaluate: () => 0, // calculated below
|
|
@@ -131,7 +131,7 @@ const applyMetrics = (data, target) => {
|
|
|
Object.entries(metrics)
|
|
|
.map(([name, metric]) => [name, metric.evaluate(data, target)])
|
|
|
);
|
|
|
- const power = target.chroma - target.lightness;
|
|
|
+ const power = target.chroma * target.lightness;
|
|
|
scores.alpha = Math.pow(scores.sigma, 1 - power) * Math.pow(scores.bigTheta, 1 + power);
|
|
|
return scores;
|
|
|
};
|