How to decide dashboard’s general buttons when having multiple clients with different colors each?

I have this project, where I have to implement text, raised and ghost buttons depending on the different sections. It's kind of a wizard-style app, with a dashboard with steps to complete and submit.

So this app serves to different clients, and with each client, comes the main color which is the brand color of the same before. It is used mostly in the header of the app to generate loyalty with the customer's brand.

There are exceptions, of course, as the icons colors. i.e. Red for 'caution', 'error' or 'delete'.

My question is, how I choose color rules for the buttons when the main brand color may vary depending on the customer?

For example, what do I do when the main color of the customer is red? (in terms of usability) or in an extreme case, light yellow?

The main background of the dashboard is white and light gray for the body.

Image example: enter image description here

Thanks