canvaskit-wasm 0.39
build 2026-04-29
ColorType
Per-pixel byte layout. Carried on ImageInfo. Determines how many bytes/floats per pixel and the channel order.
All values
| Value | Bytes / pixel | Notes |
|---|---|---|
Alpha_8 | 1 | Single 8-bit alpha channel. Useful for masks. |
RGB_565 | 2 | 5-bit R, 6-bit G, 5-bit B. No alpha. |
RGBA_8888 | 4 | Default. 8-bit per channel, in R, G, B, A order. |
BGRA_8888 | 4 | 8-bit per channel in reverse order — matches the platform's native pixel format on some systems. |
RGBA_1010102 | 4 | 10-bit RGB + 2-bit alpha. Wide-color HDR pipelines. |
RGB_101010x | 4 | 10-bit RGB, alpha implied opaque. |
Gray_8 | 1 | Single 8-bit greyscale channel. |
RGBA_F16 | 8 | Half-float per channel. HDR. |
RGBA_F32 | 16 | Full-float per channel. Maximum precision; expensive. |