18 releases (9 breaking)
0.10.1 | Jul 9, 2024 |
---|---|
0.9.0 | Jun 7, 2024 |
0.8.1 | Feb 3, 2024 |
0.7.0 | Dec 30, 2023 |
0.1.0 | Sep 9, 2022 |
#54 in Multimedia
179 downloads per month
140KB
2K
SLoC
ColCon 0.10.1
Comprehensive colorspace conversions in Rust.
Features
- Pure Rust, no dependencies.
- sRGB, RGB, CIE XYZ, CIE LAB, Oklab, JzAzBz, HSV
- LCH/Cylindrical versions of all LAB spaces
- Most functions compile to a C lib
- Generic over F32/F64 with const alpha channel
- FMA3 used where supported
- Accurate across a wide variety of tests, referencing colour-science
Future
std::simd
either after stabilization or as a nightly feature- More spaces?
F.A.Q.
Question | Answer |
---|---|
Why? | I greatly enjoy working with Uniform Color Spaces and wish to see them become more accessible and easy to use. |
lib.rs
:
Comprehensive colorspace conversions in pure Rust
The working data structure is [DType; ValidChannels]
, where DType is one of
f32
or f64
and ValidChannels is either 3 or 4, with the 4th channel representing
alpha and being unprocessed outside of typing conversions
Formulae are generally taken from their research papers or Wikipedia and validated against colour-science https://github.com/colour-science/colour
This crate references CIE Standard Illuminant D65 for functions to/from CIE XYZ