colourutil update

This commit is contained in:
minjaesong
2018-02-16 10:49:13 +09:00
parent 40423ede52
commit d11fd281f4
6 changed files with 22 additions and 9 deletions

View File

@@ -23,7 +23,7 @@ object CIEXYZUtil {
return xyz.toColor()
}
@Deprecated("Use one in CIELAB or CIELUV; CIEXYZ is not perceptually uniform")
/*@Deprecated("Use one in CIELAB or CIELUV; CIEXYZ is not perceptually uniform")
fun getGradient(scale: Float, fromCol: Color, toCol: Color): Color {
val from = fromCol.toXYZ()
val to = toCol.toXYZ()
@@ -33,7 +33,7 @@ object CIEXYZUtil {
val newAlpha = FastMath.interpolateLinear(scale, from.alpha, to.alpha)
return CIEXYZ(newX, newY, newZ, newAlpha).toColor()
}
}*/
fun Color.toXYZ(): CIEXYZ = RGB(this).toXYZ()