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.024),
  (305, 1.048),
  (310, 2.072),
  (315, 6.648),
  (320, 11.224),
  (325, 15.936),
  (330, 20.647),
  (335, 22.266),
  (340, 23.885),
  (345, 25.851),
  (350, 27.817),
  (355, 29.219),
  (360, 30.621),
  (365, 32.464),
  (370, 34.308),
  (375, 33.446),
  (380, 32.584),
  (385, 35.335),
  (390, 38.087),
  (395, 49.518),
  (400, 60.949),
  (405, 64.751),
  (410, 68.554),
  (415, 70.065),
  (420, 71.577),
  (425, 69.746),
  (430, 67.914),
  (435, 76.760),
  (440, 85.605),
  (445, 91.799),
  (450, 97.993),
  (455, 99.228),
  (460, 100.463),
  (465, 100.188),
  (470, 99.913),
  (475, 101.326),
  (480, 102.739),
  (485, 100.409),
  (490, 98.078),
  (495, 99.379),
  (500, 100.680),
  (505, 100.688),
  (510, 100.695),
  (515, 100.341),
  (520, 99.987),
  (525, 102.098),
  (530, 104.210),
  (535, 103.156),
  (540, 102.102),
  (545, 102.535),
  (550, 102.968),
  (555, 101.484),
  (560, 100.000),
  (565, 98.608),
  (570, 97.216),
  (575, 97.482),
  (580, 97.749),
  (585, 94.590),
  (590, 91.432),
  (595, 92.926),
  (600, 94.419),
  (605, 94.780),
  (610, 95.140),
  (615, 94.680),
  (620, 94.220),
  (625, 92.334),
  (630, 90.448),
  (635, 91.389),
  (640, 92.330),
  (645, 90.592),
  (650, 88.854),
  (655, 89.586),
  (660, 90.317),
  (665, 92.133),
  (670, 93.950),
  (675, 91.953),
  (680, 89.956),
  (685, 84.817),
  (690, 79.677),
  (695, 81.258),
  (700, 82.840),
  (705, 83.842),
  (710, 84.844),
  (715, 77.539),
  (720, 70.235),
  (725, 74.768),
  (730, 79.301),
  (735, 82.147),
  (740, 84.993),
  (745, 78.437),
  (750, 71.880),
  (755, 62.337),
  (760, 52.793),
  (765, 64.360),
  (770, 75.927),
  (775, 73.872),
  (780, 71.818),
];

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