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); 81] = [
  (380, 2.64),
  (385, 2.77),
  (390, 3.42),
  (395, 3.68),
  (400, 4.33),
  (405, 5.5),
  (410, 5.94),
  (415, 7.2),
  (420, 9.02),
  (425, 10.27),
  (430, 12.48),
  (435, 16.82),
  (440, 16.04),
  (445, 15.26),
  (450, 22.58),
  (455, 20.07),
  (460, 15.13),
  (465, 25.27),
  (470, 28.04),
  (475, 15.99),
  (480, 10.4),
  (485, 11.1),
  (490, 13.44),
  (495, 22.62),
  (500, 49.71),
  (505, 17.21),
  (510, 17.12),
  (515, 27.26),
  (520, 20.02),
  (525, 21.54),
  (530, 23.36),
  (535, 25.66),
  (540, 29.69),
  (545, 43.12),
  (550, 98.3),
  (555, 125.6),
  (560, 134.57),
  (565, 149.7),
  (570, 166.12),
  (575, 98.77),
  (580, 30.47),
  (585, 1.17),
  (590, 0.39),
  (595, 1.65),
  (600, 21.41),
  (605, 76.11),
  (610, 126.16),
  (615, 161.96),
  (620, 160.06),
  (625, 158.19),
  (630, 153.69),
  (635, 147.4),
  (640, 140.6),
  (645, 134.92),
  (650, 127.59),
  (655, 124.65),
  (660, 118.02),
  (665, 113.94),
  (670, 118.1),
  (675, 115.16),
  (680, 102.85),
  (685, 90.54),
  (690, 83.34),
  (695, 79.44),
  (700, 76.97),
  (705, 74.85),
  (710, 73.12),
  (715, 71.51),
  (720, 70.13),
  (725, 69.04),
  (730, 67.48),
  (735, 66.7),
  (740, 66.31),
  (745, 65.14),
  (750, 65.7),
  (755, 64.79),
  (760, 64.1),
  (765, 83.04),
  (770, 86.25),
  (775, 63.93),
  (780, 64.92),
];

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