In the app I'm building, I have a variable with a hex colour code:
accentColour = "#0877df"
This value can be changed by the user.
Since I'm using GTK+3, I'm using a CSS file to style the widgets. How can I pass the accentColour variable to use as a colour in CSS?
You can't. Instead, I would put only the default color in your CSS file. Then make a CSS string in your code that overrides only the things that are affected by the color change, and add it in a separate CSS provider.