How to store colors for future use

I’m creating a UI for a game in which I change the colors of images quite often.
For example, I have a button build from all white images, which I assign different colors. When the button is clickable, I want it to be green, when it can’t be clicked, it’s grey. Same with background images, health bars and so on.
As of now, I use materials to store all colors and assign them to the images once they should change.

For me, this solution seems quite off. I have a ton of materials which are difficult to organize, I have to assign every UI Script the required materials, I can’t properly lerp colors and so on.

Is there a better way to store all those colors and assign them quick and easy, like a dedicated color storage script?

Thanks in advance!

You could write your own static class were you can save your individual colors, e.g. as hex value. Something like:

static class MyColors 
{
    private static string red = "#ff0000";

    public static Color GetMyRed(){
        Color tmpColor;
        if(ColorUtility.TryParseHtmlString(red, out tmpColor)){
            return tmpColor;
        }
        return Color.red; //just in the case it couldn't be parsed            
    }    
}

And then you can call it so:

Color myIndividualRed =  MyColors.GetMyRed();

And if you need only the default Colors like red, green, blue and so on you can take the static Colors class.

You can simply call it in this way:

Color myDefaultRedColor =  Color.red;

You should be able to change the color property of the Image component