i'm trying to making a RGB with integer value (int), my Tesselator function using (int*) and i don't know how to use it for making the RGB. I tried one function that's worked but it's not the same color if i call it 2 time.
the code for make int RGB:
uint32_t colorDoRGB;
void TextRGB()
{
    if (UI::Color::RainbowRED > 0 && UI::Color::RainbowBLUE == 0)
    {
        UI::Color::RainbowRED -= 1;
        UI::Color::RainbowGREEN += 1;
    }
    if (UI::Color::RainbowGREEN > 0 && UI::Color::RainbowRED == 0)
    {
        UI::Color::RainbowGREEN -= 1;
        UI::Color::RainbowBLUE += 1;
    }
    if (UI::Color::RainbowBLUE > 0 && UI::Color::RainbowGREEN == 0)
    {
        UI::Color::RainbowRED += 1;
        UI::Color::RainbowBLUE -= 1;
    }
}
void START_RGB_RAINBOW()
{
    if (UI::Settings::Rainbow)
    {
        colorDoRGB += 15;
        if (colorDoRGB == 30)
        {
            TextRGB();
            colorDoRGB = 0;
        }
    }
}
the code for (int*) when i use it multiple time it's not same color:
int* GetThemeRainbow()
{
    int RAINBOW[3] = { UI::Color::RainbowRED, UI::Color::RainbowGREEN, UI::Color::RainbowBLUE };
    return RAINBOW;
}
 
    