Lua
C++
Edit

Rgba

This function combines four 8-bit color channels into a single packed RGBA color.

Syntax

Parameter Description
r red component
g green component
b blue component
a alpha component

Returns

Returns an RGBA color packed into a single integer. The individual color channel values can be extracted with the Red, Green, Blue, and Alpha functions.

Example

#include "UltraEngine.h"

using namespace UltraEngine;

int main(int argc, const char* argv[])
{
    int color = Rgba(220,64,128,255);

    Print(Red(color));
    Print(Green(color));
    Print(Blue(color));
    Print(Alpha(color));

    return 0;
}
Copyright © 2024 Ultra Software.
All rights reserved.