java.lang.IllegalArgumentException: l must be in interval [0, 100] in LAB(l=100.00000386666655, a=-1.6666666158293708E-5, b=6.666666463317483E-6, alpha=1.0)
at com.github.ajalt.colormath.LAB.<init>(LAB.kt:15)
at com.github.ajalt.colormath.XYZ.toLAB(XYZ.kt:58)
at com.github.ajalt.colormath.RGB.toLAB(RGB.kt:168)
It's likely because of the rounding errors of the floats. Maybe use coerceAtMost in the toLAB method?
This fails with
It's likely because of the rounding errors of the floats. Maybe use
coerceAtMost
in thetoLAB
method?