This function combines four 8-bit color channels into a single packed RGBA color.
Parameter | Description |
---|---|
r | red component |
g | green component |
b | blue component |
a | alpha component |
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.
#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;
}