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); 97] = [
  (300, 0.043),
  (305, 2.588),
  (310, 5.133),
  (315, 17.470),
  (320, 29.808),
  (325, 42.369),
  (330, 54.930),
  (335, 56.095),
  (340, 57.259),
  (345, 60.000),
  (350, 62.740),
  (355, 62.861),
  (360, 62.982),
  (365, 66.647),
  (370, 70.312),
  (375, 68.507),
  (380, 66.703),
  (385, 68.333),
  (390, 69.963),
  (395, 85.946),
  (400, 101.929),
  (405, 106.911),
  (410, 111.894),
  (415, 112.346),
  (420, 112.798),
  (425, 107.945),
  (430, 103.092),
  (435, 112.145),
  (440, 121.198),
  (445, 127.104),
  (450, 133.010),
  (455, 132.682),
  (460, 132.355),
  (465, 129.838),
  (470, 127.322),
  (475, 127.061),
  (480, 126.800),
  (485, 122.291),
  (490, 117.783),
  (495, 117.186),
  (500, 116.589),
  (505, 115.146),
  (510, 113.702),
  (515, 111.181),
  (520, 108.659),
  (525, 109.552),
  (530, 110.445),
  (535, 108.367),
  (540, 106.289),
  (545, 105.596),
  (550, 104.904),
  (555, 102.452),
  (560, 100.000),
  (565, 97.808),
  (570, 95.616),
  (575, 94.914),
  (580, 94.213),
  (585, 90.605),
  (590, 86.997),
  (595, 87.112),
  (600, 87.227),
  (605, 86.684),
  (610, 86.140),
  (615, 84.861),
  (620, 83.581),
  (625, 81.164),
  (630, 78.747),
  (635, 78.587),
  (640, 78.428),
  (645, 76.614),
  (650, 74.801),
  (655, 74.562),
  (660, 74.324),
  (665, 74.873),
  (670, 75.422),
  (675, 73.499),
  (680, 71.576),
  (685, 67.714),
  (690, 63.852),
  (695, 64.464),
  (700, 65.076),
  (705, 66.573),
  (710, 68.070),
  (715, 62.256),
  (720, 56.443),
  (725, 60.343),
  (730, 64.242),
  (735, 66.697),
  (740, 69.151),
  (745, 63.890),
  (750, 58.629),
  (755, 50.623),
  (760, 42.617),
  (765, 51.985),
  (770, 61.352),
  (775, 59.838),
  (780, 58.324),
];

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