On Sun, 5 Sep 2021 23:48:43 -0700 (PDT) Tony Kennedy wrote:
TK> Hello all,
TK>
TK> My app works well in dark mode by taking a colour, converting to HSL,
TK> modifying the luminescence and converting back to RGB. I'd like to do the
TK> same with the icons if I can.
TK>
TK> I've tried using the wxBitmap::GetPalette, but I always get a NULL
TK> returned. I've experimented with other things, but failed all the time.
Palettes are not really used since a couple of decades already, so this is
not going to work.
TK> Does anyone know a way of doing this? Most of my icons have less than 5
TK> colours, I was hoping I could get a list of them, modify them and apply
TK> them to the original bitmap.
Icons are typically not that big, so you could just convert wxBitmap to
wxImage, transform each pixel individually and then convert it back.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/