![]() |
Next Page |
| Contents > Functions reference (alphabetical list) > Text formatting functions > RGB function |
|
|
| RGB function |
| Format |
RGB(red;green;blue) |
| Parameters |
| red - any numeric expression or numeric field containing a value ranging from 0 to 255 |
| green - any numeric expression or numeric field containing a value ranging from 0 to 255 |
| blue - any numeric expression or numeric field containing a value ranging from 0 to 255 |
| Data type returned |
| number |
| Description |
| red * 2562 + green * 256 + blue |
| where 2562 = 65536 |
| Tip To determine the RGB value of a color: |
| (Windows) In Layout mode, click the Fill Color palette and choose Other Color. Values are shown for each of the basic colors. |
| (Mac OS) Start the DigitalColor Meter application in the Applications/Utilities folder. Choose RGB As Actual Value, 8-bit. Move the pointer over colors onscreen to see their values. |
| Examples |
| RGB(255;0;0) returns 16711680 representing red. |
| RGB(0;255;0) returns 65280 representing green. |
| RGB(0;0;255) returns 255 representing blue. |
| RGB(0;0;0) returns 0 representing black. |
| RGB(255;255;255) returns 16777215 representing white. |
| Related topics |
| Functions reference (category list) |
| Functions reference (alphabetical list) |
| About formulas |
| About functions |
| Defining calculation fields |
| Using operators in formulas |
|
|
| Contents > Functions reference (alphabetical list) > Text formatting functions > RGB function | Next Page |