I need to get the font color of the current theme.
I found this question that explains it how to do it in C with gtk_style_lookup_color
, but it seems th
I found the answer using gtk.settings.
settings=Gtk.Settings.get_default()
colors=settings.get_property("gtk-color-scheme")
colors=colors.split("\n")
for color in colors:
if 'text' in color:
text_color=color.split(':')[1].strip()
print text_color
break
It seems that the "gtk-color-scheme"
property stores all the colors of the theme, so if you are searching for any other color you can find it in the same way!