The problem is the colors selected do not show the light text color of the dark theme. So the colors of the background needs to be able to show both;
Here is a site that allows selecting the various values to set colors. Notice the scale is 0 to 255
. The scale used by the gdk code is 0.0 to 1.0
.
I have not found the same type of tool for a 0 to 1
scale. But using 100 and 150 as the main numbers, dividing by 255; I substituted the numbers in the code.
Original code
self.categories_translated = [_(cat) for cat in self.categories]
self.colors = [
Gdk.RGBA(0.9,0.9,0.99, 0.999),
Gdk.RGBA(0.9,0.99,0.9, 0.999),
Gdk.RGBA(0.99,0.99,0.9, 0.999),
Gdk.RGBA(0.99,0.9,0.9, 0.999),
Gdk.RGBA(0.9,0.99,0.99, 0.999),
Gdk.RGBA(0.99,0.9,0.99, 0.999),
]
became
self.categories_translated = [_(cat) for cat in self.categories]
self.colors = [
Gdk.RGBA(0.39,0.39,0.58, 0.999),
Gdk.RGBA(0.39,0.58,0.39, 0.999),
Gdk.RGBA(0.58,0.58,0.39, 0.999),
Gdk.RGBA(0.58,0.39,0.39, 0.999),
Gdk.RGBA(0.39,0.58,0.58, 0.999),
Gdk.RGBA(0.58,0.39,0.58, 0.999),
]
Seems to work for both light and dark themes. But you and @kku can play around with the palette.