Is it able to draw HDR lines on canvas?
# compose
k
Is it able to draw HDR lines on canvas?
2
s
I think he’s referring to the analogy feature from iOS 26’s Liquid Glass. Some Liquid Glass elements have very bright white highlights, likely using HDR to boost pixel brightness in specific areas. The author is asking if we can achieve the same effect on a canvas, for example, drawing white lines with extra-bright HDR in localized regions.
I know we can set a wide color gamut for the current window, but that’s more about the DCI-P3 color space. Recently, Android added an HDR image format, Ultra HDR or whatever it’s called, and if you display such an image in a layout, that region becomes extra bright. There might be APIs to achieve this effect, but I’m not sure if they’re public for a regular UI elements. Reference: https://developer.android.com/media/platform/hdr-image-format
k
Thanks for explaining! But I want to draw vectors rather than images. Can't Android do that? https://developer.android.com/about/versions/14/features#ultra-hdr
s
Apparently not in HDR mode, at least not now. I don’t recall such an API for regular UI. However, doing OpenGL/Vulkan stuff in a SurfaceView gives you full control over color space and HDR rendering, so that’s possible there. But that’s completely different story.
k
Well, that's so complicated. I gave up.
☹️ 3