You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Android, the matrix is passed to Android's own ColorMatrix class. That treats the final column in the range of -255..255. On Skiko backed platforms though, it is passed directly to Skia, and that treats the final column in the range of -1f..1f.
The docs on androidx.compose.ui.graphics.ColorMatrix in CMP list out the range -255..255, so it sounds like there's need to be a mapping before the matrix is set to Skiko?
Example:
val cm =ColorMatrix().apply {
this[0, 4] =64fthis[1, 4] =64fthis[2, 4] =64f
}
Image(
...,
colorFilter =ColorFilter.colorMatrix(colorMatrix),
)
On Android, the image will look brighter. On iOS, the image will be completely white.
Affected platforms
Select one of the platforms below:
Skiko backed platforms
The text was updated successfully, but these errors were encountered:
Describe the bug
On Android, the matrix is passed to Android's own
ColorMatrix
class. That treats the final column in the range of-255..255
. On Skiko backed platforms though, it is passed directly to Skia, and that treats the final column in the range of-1f..1f
.The docs on
androidx.compose.ui.graphics.ColorMatrix
in CMP list out the range-255..255
, so it sounds like there's need to be a mapping before the matrix is set to Skiko?Example:
On Android, the image will look brighter. On iOS, the image will be completely white.
Affected platforms
Select one of the platforms below:
The text was updated successfully, but these errors were encountered: