I've been testing an HTML5 webapp on eReaders, and I got it mostly working, but the colors are all messed up (it's monochrome). My app uses lots of colors with an update every second. I need this to run on colored displays as well, so I need to detect if it's monochrome.
The eReader that I'm using is made by Sony, and it reports screen.pixelDepth
and screen.colorDepth
as both 16, which IS different than most other devices I support (24 and 32 are common).
My ideas so far are:
- Always display monochrome to devices that report 16-bit color
- Sniff from User-Agent /
navigator.appVersion
- Sample bits from canvas (though I assume that may lie as well)
Is it safe to assume that 16-bit color = monochrome? Or is there another trick that I could be overlooking that would be more reliable?