Contact

COLOR in Collabora Office: Construct and Inspect Numeric RGBA Color Values

Spreadsheet Intermediate Collabora Office Calc

Build numeric RGBA values with Collabora COLOR, supply alpha explicitly, check component limits, and inspect packed channel arithmetic.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: =COLOR(0;0;255;255) has the documented result 4278190335, representing full blue with an alpha value of 255. COLOR returns a number; entering it in a cell does not by itself paint the cell.

Syntax and channel ranges

=COLOR(Red; Green; Blue [; Alpha])

Red, Green, and Blue are required and must each be between 0 and 255. Zero contributes none of that channel; 255 contributes its full amount. Alpha is optional and is documented as an integer from 0 to 255. In this help, alpha zero means fully transparent and alpha 255 means fully opaque.

The dedicated section does not state the value assumed when Alpha is omitted. The reproducible examples here therefore supply all four arguments explicitly. Do not invent an omitted-alpha default from another program or from a different color convention.

Collabora also warns that the result depends on the computer’s color system. The numeric expectations below use the arrangement demonstrated by its own examples, rather than claiming a universal packing contract on every platform.

Example: reproduce the vendor’s three controls

Enter these four channel columns in A2:D4. In E2 enter =COLOR(A2;B2;C2;D2) and fill down.

Row A: red B: green C: blue D: alpha E: documented result
2 255 255 255 1 33554431
3 0 0 255 0 255
4 0 0 255 255 4278190335

The first row uses alpha 1, not 255. It should not be described as fully opaque white. The second row retains a blue-channel value even though alpha zero marks it fully transparent; RGB information and visibility are separate concepts.

Format E2:E4 as ordinary integers with enough width. Scientific notation can obscure the exact stored integer. These are documented values independently checked by arithmetic, not fresh native observations.

Understand the arithmetic shown by the examples

For the packing demonstrated in those controls, the independent numeric model is:

=16777216*D2+65536*A2+256*B2+C2

The coefficients are powers of 256: alpha occupies the highest byte, then red, green, and blue. For row 2, the lower three channels total 16777215, and alpha contributes 16777216, giving 33554431. For row 4, 255×16777216+255=4278190335.

This arithmetic explains the reference examples. It is not a claim that an independently written packing formula overrides Collabora’s documented platform dependence.

Advanced example: build a palette with explicit transparency

Create rows for opaque red 255, 0, 0, 255, opaque green 0, 255, 0, 255, and opaque blue 0, 0, 255, 255. Under the example-derived arithmetic, the expected numeric values are respectively 4294901760, 4278255360, and 4278190335.

Add a second blue row 0, 0, 255, 128. Its independently expected number is 2147483903. It shares the same RGB channels as opaque blue but a different alpha value. Keep the channel columns alongside the packed number, especially when exporting to a tool that uses another channel order or alpha convention.

A packed COLOR value is not a CSS color string such as #0000FF, and it does not automatically configure conditional formatting. Use the receiving feature’s documented input format instead of assuming it accepts this integer.

Advanced check: inspect a packed value

With the documented opaque-blue number in E4, these independent arithmetic checks recover blue and alpha:

=MOD(E4;256)
=INT(E4/16777216)

Expected results are 255 and 255. MOD obtains the lowest byte; INT isolates the high byte in this nonnegative example. These formulas inspect the demonstrated representation; they do not query a cell’s actual background color.

Errors and compatibility limits

The vendor explicitly gives =COLOR(0;0;400;0) as Err:502, an invalid argument because blue exceeds 255. Validate every channel range and require a whole-number alpha. The dedicated section does not fully specify RGB fractional-input handling, text conversion, or all possible invalid-input errors.

The help identifies COLOR as outside the OpenDocument 1.3 OpenFormula standard and gives the namespace ORG.LIBREOFFICE.COLOR. That serialization identifier is not evidence of cross-product behavior or file round-trip compatibility. When sharing a workbook, preserve channel inputs and test the exact target product rather than relying solely on the packed value.

Availability and verification

The exact function is documented in Collabora Office 26.04 desktop help, retrieved and reviewed on October 17, 2026. This establishes a documentation scope, not the first release that introduced the function or the last version in which it works; those versions and any retirement date remain unestablished. Collabora Online and mobile support are not inferred from desktop help, nor is behavior in another spreadsheet product.

The examples are documentation-based expectations with independent calculations. They have not been executed in Collabora Office. No application screenshot or native error/coercion certification is implied. Formulas use English function names and semicolon argument separators.

References