Is it possible to give a color to int variables?

This looks like a dumb question, but I really need a solution.

How do you color an integer variable if its called in a text. consider the example below:

    int mc;

    private void Start()
    {
        mc = GameObject.FindGameObjectWithTag("MC").GetComponent<MissionCount>().missionCount;
        
        missionBox.GetComponentInChildren<Text>().text = "Your mission is to break " + mc + " Squares";
    }

missionCount is an integer value, and I want to change its color to something different. Please help me if you understood the question.

Yes.

Try this

Rich Text
https://docs.unity3d.com/Packages/com.unity.ugui@1.0/manual/StyledText.html

We are <color=#ff0000ff> colorfully </color> amused ("colorfully" will be red.)

You can also use <color = > text </color> with predefined colors.

Not really.

I have missionCount int variable. and I want to add that into a text component of another GameObject. the code above is working fine and is giving me, what I want. But I want to change the color of ‘mc’ in the text. so the result will be:

missionBox.GetComponentInChildren<Text>().text = "Your mission is to break " + mc + " Squares";

but mc will be colored differently.