ph-color 0.1.1

Fixed-point no_std color math for embedded targets: conversion, transfer functions, matrices, gain, and interpolation
Documentation
//! CIE xy chromaticities stored as millionths. Identity metadata only.

/// CIE xy pair in millionths (`1_000_000` = 1.0).
///
/// These numbers document a space. The target crate must not invert, adapt,
/// or otherwise derive a matrix from them.
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub struct Chromaticities {
    /// CIE x × 1_000_000.
    pub x_millionths: u32,
    /// CIE y × 1_000_000.
    pub y_millionths: u32,
}

impl Chromaticities {
    /// Construct from millionths.
    #[must_use]
    pub const fn from_millionths(x_millionths: u32, y_millionths: u32) -> Self {
        Self {
            x_millionths,
            y_millionths,
        }
    }
}