Published
Edited
Nov 21, 2019
1 fork
18 stars
Insert cell
Insert cell
ΔE = sqrt(
(ΔLp / (k_L * S_L)) ** 2
+ (ΔCp / (k_C * S_C)) ** 2
+ (ΔHp / (k_H * S_H)) ** 2
+ R_T
* (ΔCp / (k_C * S_C))
* (ΔHp / (k_H * S_H))
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
C_1 = sqrt(a_1 ** 2 + b_1 ** 2)
Insert cell
Insert cell
C_2 = sqrt(a_2 ** 2 + b_2 ** 2)
Insert cell
Insert cell
ΔLp = L_2 - L_1
Insert cell
Insert cell
L_ = (L_1 + L_2) / 2
Insert cell
Insert cell
C_ = (C_1 + C_2) / 2
Insert cell
Insert cell
ap_1 = a_1 + (a_1 / 2) * (1 - sqrt(C_ ** 7 / (C_ ** 7 + 25 ** 7)))
Insert cell
Insert cell
ap_2 = a_2 + (a_2 / 2) * (1 - sqrt(C_ ** 7 / (C_ ** 7 + 25 ** 7)))
Insert cell
Insert cell
Cp_ = (Cp_1 + Cp_2) / 2
Insert cell
Insert cell
ΔCp = Cp_2 - Cp_1
Insert cell
Insert cell
Cp_1 = sqrt(ap_1 ** 2 + b_1 ** 2)
Insert cell
Insert cell
Cp_2 = sqrt(ap_2 ** 2 + b_2 ** 2)
Insert cell
Insert cell
hp_1 = (atan2(b_1, ap_1) + 360) % 360
Insert cell
Insert cell
hp_2 = (atan2(b_2, ap_2) + 360) % 360
Insert cell
Insert cell
Δhp = abs(hp_1 - hp_2) <= 180 ? hp_2 - hp_1
: hp_2 <= hp_1 ? hp_2 - hp_1 + 360
: hp_2 - hp_1 - 360
Insert cell
Insert cell
ΔHp = 2 * sqrt(Cp_1 * Cp_2) * sin(Δhp / 2)
Insert cell
Insert cell
Hp_ = abs(hp_1 - hp_2) <= 180 ? (hp_1 + hp_2) / 2
: hp_1 + hp_2 < 360 ? (hp_1 + hp_2 + 360) / 2
: (hp_1 + hp_2 - 360) / 2
Insert cell
Insert cell
T = 1
- 0.17 * cos(Hp_ - 30)
+ 0.24 * cos(2 * Hp_)
+ 0.32 * cos(3 * Hp_ + 6)
- 0.20 * cos(4 * Hp_ - 63)
Insert cell
Insert cell
S_L = 1 + 0.015 * ((L_ - 50) ** 2) / sqrt(20 + (L_ - 50) ** 2)
Insert cell
Insert cell
S_C = 1 + 0.045 * Cp_
Insert cell
Insert cell
S_H = 1 + 0.015 * Cp_ * T
Insert cell
Insert cell
R_T = -2
* sqrt((Cp_ ** 7) / (Cp_ ** 7 + 25 ** 7))
* sin(60 * exp(-(((Hp_ - 275) / 25) ** 2)))
Insert cell
Insert cell
sin = x => Math.sin(x * Math.PI / 180)
Insert cell
cos = x => Math.cos(x * Math.PI / 180)
Insert cell
atan2 = (y, x) => Math.atan2(y, x) * 180 / Math.PI
Insert cell
sqrt = Math.sqrt
Insert cell
exp = Math.exp
Insert cell
abs = Math.abs
Insert cell
color = value => {
const form = html`<form><input name=color type=color value=${value}>`;
form.color.oninput = () => form.value = d3.lab(form.color.value);
form.value = d3.lab(value);
return form;
}
Insert cell
d3 = require("d3-color@1")
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more