mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 04:24:05 +09:00
colourutil update
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user