Return a numeric value calculated by a combination of three colors (red, green and blue) and the alpha channel, in the RGBA color system. The result depends on the color system used by your computer.
COLOR(Red; Green; Blue; Alpha)
Returns an positive integer.
Red, Green and Blue (required) The value for the red, green and blue components of the color. The values must be between 0 and 255. Zero means no color component and 255 means full color component.
Alpha (optional) The value for the alpha channel or alpha composite. Alpha is a integer value between 0 and 255. The value of zero for alpha means the color is fully transparent, whereas a value of 255 in the alpha channel gives a fully opaque color.
- If either argument is a decimal number then its floor value is considered.
- If either argument is less than 0 or greater than 255, the function returns the an error value.
|=COLOR(255;255;255;1)||Red, Green and Blue have full color component and alpha channel is 1||33554431|
|=COLOR(0;0;255;0)||Red and Green have no color component and Blue has full color component and alpha channel is 0 indicating fully transparent||255|
|=COLOR(0;0;255;255)||Red has no color component, Green and Blue have full color component and alpha channel is 255 indicating fully opaque||4278190335|
|=COLOR(255;255;255)||Red, Green and Blue have full color component, alpha channel is optional||16777215|
|=COLOR(25.5;255;255)||Red value is 25(floor value is considered for decimal numbers), Green and Blue have full color component, alpha channel is optional||1703935|
|=COLOR(25.5;255;255)||Red, Green and Blue have full color component, alpha channel||16777215|
|=COLOR(255;-255;255)||Green has negative value so the function will return an error value||Err:502|
|=COLOR(255;256;255)||Green has value out of range so the function will return an error value||Err:502|
Related LibreOffice functions:
Equivalent Excel functions: