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,
Like Mike said
or you can use the gulp sass build train.
How Do I Start Styling In Mendix (Gulp & Sass)
and change the files in your mendix custom theme.