Is there a way to determine the device's color depth?

So for example the venu seems to support 24-bit color, while the Fenix 5x+ supports 6-bits (as far as I can tell, but I can't find it documented anywhere).

Screen width, height, and shape are all described in System.DeviceSettings. You can also get some display info from a Graphics.Dc (when you have one available). But I can't find anything that actually gives the color depth. I suppose some devices may not have an actual color depth, and could just have a color palette instead.

Is it something I just have to know for each supported device? And if so, is there documentation describing this for each device? Right now I'm drawing a color gradient in the simulator, and trying to eyeball how quantized it is, which is time consuming, probably inaccurate, and depends on the simulator getting it right...

  • Thanks Mark !

    Another question, I have a problem with displayName encoding on Windows 10. Sample =>  "displayName": "D2??? Air",

    Do you have the same problem ?

  • I have a problem with displayName encoding on Windows 10

    Well, I've not tried it on windows, but on MacOS I get D2Tm Air.

    As long as you're using a recent version of jq (1.5 or later, I believe) it should handle uff-8 properly; so the other possibility is that windows is interpreting the characters as something other than utf-8. Not sure what to suggest there... are you using PowerShell? If so, the docs suggest that it defaults to unicode. If you're using some other shell, that might be the issue...