Best way to change default colors

Kind of a noob question, but i didn’t find any answer to this on the web:
i want to change the default colors (COLOR_BLACK, COLOR_RED, DEFAULT_FRCOLOR) and started off changing these in IGraphicsStructs.h, but then i realized that this is not the best idea since it’s then effectively a fork of upstream iPlug2.
I figured the best way would be to define my own constants in myplugin.h, but IGraphicsStructs.h doesn’t get included in here so i can’t use IColor or IVColorSpec. Including IGraphicsStructs.h here doesn’t seem to work either (not sure why).
My question is where would the best place be to define my own colors? In myplugin.cpp it would work but shouldn’t const variables like this be defined in the header file?
Thanks for any replies,
cnm

Defining colors in myplugin.cpp at the beginning of mLayoutFunc (just after loading fonts and graphichs, but before defining Styles):

const IColor myCOLOR_FIRST(222, 222, 200, 190);
const IColor myCOLOR_SECOND= IColor::FromHSLA(0.58333, 0.3f, 0.77f, 1.f);

works nicely for me

1 Like

Will do it like that as well. Thank you!

1 Like