Jakob,
I use Sass and Koala to accomplish these kinds of things. The cookbook for this can be found here: https://docs.mendix.com/howto/front-end/setup-mendix-ui-framework-with-koala#1-introduction
Alternatively, you could edit your app in the Web Modeler, change the brand primary color there and then sync changes with the desktop Modeler.
Hope that helps,
Mike
Like Mike said
or you can use the gulp sass build train.
How Do I Start Styling In Mendix (Gulp & Sass)
https://medium.com/@jasonteunissen/how-do-i-start-styling-in-mendix-gulp-sass-6b37ddaf8de6
and change the files in your mendix custom theme.