In Unity's editor I have set a swatch with some colours that are used throughout our game:
This swatch is saved in a file in the project's Assets folder:
I would like to use the colours in this swatch somewhere in a script:
GetComponent<Graphic>().color = SomethingHere.MainRed;
What is the best way to do this? Or is it not possible?Reflection
I also think that I'm doing something really strange? I couldn't find any answer to this question online. But having the same colour library in the scripts as I use in the editor would be really nice.