For using symbolic icons, that change color, …
- there’s some information here: HowDoI/ThemedIcons - GNOME Wiki!
- and some here: Help in adding symbolic icons to my application
Further, if you want to manually detect colors of the theme, you can use this:
GdkRGBA foreground_color = {0};
GtkWidget * tmp = gtk_button_new ();
GtkStyleContext * context = gtk_widget_get_style_context (tmp);
gtk_style_context_get_color (context,GTK_STATE_FLAG_NORMAL,&foreground_color);
gtk_widget_destroy (tmp);