BoxDragon / kolor

Color space conversion math made simple
38 stars 7 forks source link

CIE_1960_UCS_uvV_to_XYZ and XYZ_to_CIE_1960_UCS_uvV look incorrect #11

Closed kettle11 closed 1 year ago

kettle11 commented 1 year ago

These functions appear incorrect: https://github.com/BoxDragon/kolor/blob/9663bf5502d778679126302fc2dbd94b7cd7c627/kolor/src/details/transform.rs#L318-L327

I assume they're meant to be:

#[inline]
pub fn CIE_1960_UCS_uvV_to_XYZ(color: Vec3, wp: WhitePoint) -> Vec3 {
    CIE_1960_UCS_to_XYZ(CIE_1960_uvV_to_UCS(color, wp), wp)
}
#[inline]
pub fn XYZ_to_CIE_1960_UCS_uvV(color: Vec3, wp: WhitePoint) -> Vec3 {
    CIE_1960_UCS_to_uvV(XYZ_to_CIE_1960_UCS(color, wp), wp)
}
kabergstrom commented 1 year ago

Sorry for totally missing this, it's fixed in the latest version. thanks!