farg 0.4.5

A Rust library for colorimetry, color space conversions, and color manipulation.
Documentation
use crate::{
  illuminant::{Illuminant, IlluminantType},
  spectral::Spd,
};

static SPD_DATA: [(u32, f64); 93] = [
  (320, 0.02),
  (325, 0.26),
  (330, 0.50),
  (335, 1.45),
  (340, 2.40),
  (345, 4.00),
  (350, 5.60),
  (355, 7.60),
  (360, 9.60),
  (365, 12.40),
  (370, 15.20),
  (375, 18.80),
  (380, 22.40),
  (385, 26.85),
  (390, 31.30),
  (395, 36.18),
  (400, 41.30),
  (405, 46.62),
  (410, 52.10),
  (415, 57.70),
  (420, 63.20),
  (425, 68.37),
  (430, 73.10),
  (435, 77.31),
  (440, 80.80),
  (445, 83.44),
  (450, 85.40),
  (455, 86.88),
  (460, 88.30),
  (465, 90.08),
  (470, 92.00),
  (475, 93.75),
  (480, 95.20),
  (485, 96.23),
  (490, 96.50),
  (495, 95.71),
  (500, 94.20),
  (505, 92.37),
  (510, 90.70),
  (515, 89.95),
  (520, 89.50),
  (525, 90.43),
  (530, 92.20),
  (535, 94.46),
  (540, 96.90),
  (545, 99.16),
  (550, 101.00),
  (555, 102.20),
  (560, 102.80),
  (565, 102.92),
  (570, 102.60),
  (575, 101.90),
  (580, 101.00),
  (585, 100.07),
  (590, 99.20),
  (595, 98.44),
  (600, 98.00),
  (605, 98.08),
  (610, 98.50),
  (615, 99.06),
  (620, 99.70),
  (625, 100.36),
  (630, 101.00),
  (635, 101.56),
  (640, 102.20),
  (645, 103.05),
  (650, 103.90),
  (655, 104.59),
  (660, 105.00),
  (665, 105.08),
  (670, 104.90),
  (675, 104.55),
  (680, 103.90),
  (685, 102.84),
  (690, 101.60),
  (695, 100.38),
  (700, 99.10),
  (705, 97.70),
  (710, 96.20),
  (715, 94.60),
  (720, 92.90),
  (725, 91.10),
  (730, 89.40),
  (735, 88.00),
  (740, 86.90),
  (745, 85.90),
  (750, 85.20),
  (755, 84.80),
  (760, 84.70),
  (765, 84.90),
  (770, 85.40),
  (775, 86.10),
  (780, 87.00),
];

impl Illuminant {
  pub const B: Self = Self::new("B", IlluminantType::Daylight, Spd::new(&SPD_DATA));
}