* initialize XColor/XftColor
this does not change behavior, but avoids passing uninitialized data to X/Xft functions
* gui, x11: move have_argb_visual to x11 files
this variable only has meaning with respect to X11
* x11: clear have_argb_visual if the setting changes to false
otherwise, we may try to use colors with alpha when we no longer requested a 32-bit visual
* x11: premultiply alpha of background colors
* x11: clean up set_foreground_color a bit
---------
Co-authored-by: bi4k8 <bi4k8@github>
* gradient, colours: use 24-bit colour depth internally on Wayland
our Colour type assumes this anyway; lower colour depth should be handled by display backends
* core: restore gradient color computation
this was mistakenly disabled when moving to a unified Colour representation
* core, gradient: use Colour type
* tests: gradient: always test hsv/hcl
colour computations no longer depend on the display backends we compile with, so these can be tested unconditionally now
* gradients, specials: use Color type
this makes specials now accept color names as well as hex codes, and removes all notions of color depth from gradient calculations
---------
Co-authored-by: bi4k8 <bi4k8@github>
As a side effect, font and colour specific stuff got outsourced, too.
This is because the apropriate functions are used by conky.c as well as
specials.c, so they should be kept on their own.
In the long term I hope for positive impact on the X11 integration mess.
(Take e.g. the mass of X11 ifdefs cluttering conky.c.) Though this
commit contains no optimisations in this direction, just plain
outsourcing, to ensure minimised (intended: none) changes to conky's
interface behaviour.