Creates a new RGB color object from a vector of RGB components.
This utility function is useful when working with color calculations that produce arrays of values rather than individual components.
A vector containing the RGB components [r, g, b] in the 0-1 range
Optional
The alpha (opacity) component (0-1), optional
A new RGB color object
If the vector does not have exactly 3 components
Creates a new RGB color object from a vector of RGB components.
This utility function is useful when working with color calculations that produce arrays of values rather than individual components.