feat: add color module with sRGB to Lab conversion (scalar + SIMD)

- src/color.rs: Rgb/Lab types, planar SoA storage, wide-based SIMD
  RGB to Lab conversion with scalar remainder tail
- src/palette.rs: NORD_PALETTE constant
- Cargo.toml: add image/ndarray/rayon/wide deps, tuned release profile
This commit is contained in:
2026-08-28 13:41:18 +02:00
parent 3e4772014e
commit f1fd2a1edd
5 changed files with 523 additions and 1 deletions
+20
View File
@@ -0,0 +1,20 @@
use crate::color::Rgb;
pub const NORD_PALETTE: [Rgb; 16] = [
Rgb {r: 46, g: 52, b: 64,}, // nord0
Rgb {r: 59, g: 66, b: 82,}, // nord1
Rgb {r: 67, g: 76, b: 94,}, // nord2
Rgb {r: 76, g: 86, b: 106,}, // nord3
Rgb {r: 216, g: 222, b: 233,}, // nord4
Rgb {r: 229, g: 233, b: 240,}, // nord5
Rgb {r: 236, g: 239, b: 244,}, // nord6
Rgb {r: 143, g: 188, b: 187,}, // nord7
Rgb {r: 136, g: 192, b: 208,}, // nord8
Rgb {r: 129, g: 161, b: 193,}, // nord9
Rgb {r: 94, g: 129, b: 172,}, // nord10
Rgb {r: 191, g: 97, b: 106,}, // nord11
Rgb {r: 208, g: 135, b: 112,}, // nord12
Rgb {r: 235, g: 203, b: 139,}, // nord13
Rgb {r: 163, g: 190, b: 140,}, // nord14
Rgb {r: 180, g: 142, b: 173,}, // nord15
];