Homeworld Effects Manual: floats2ColorA()
RGBA floats2ColorA(float red, float green, float blue, float alpha)
Converts four floats into an RGBA.
Sometimes the function names are so clear I feel silly explaining them. Input values are clamped to the range [0.0 - 1.0], so floats2ColorA([-5.0],0.5,1234.8, 0.8) is the same as floats2ColorA(0,0.5,1.0,0.8). This function returns a value, so remember to have an RBGA variable waiting to receive the value.