Returns an integer number from 0 to 16777215, obtained by combining color values for red, green, and blue.
RGB ( red ; green ; blue )
red
- any numeric expression or numeric field containing a value from 0 to 255
green
- any numeric expression or numeric field containing a value from 0 to 255
blue
- any numeric expression or numeric field containing a value from 0 to 255
number
FileMaker Pro 7.0
Numbers returned by this function can be passed as the color parameter in the TextColor or TextColorRemove functions. The RGB function uses the following formula to calculate the result:
red * 2562 + green * 256 + blue
where 2562 = 65536
Tip To determine the RGB value of a color, in Layout mode, click the Fill color palette in the formatting bar and choose Other Color. Values are shown for each of the basic colors. In macOS, select the Color Sliders tab. Choose RGB Sliders from the list.
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.
Using a table with text fields FirstName and LastName, specify the following auto-enter calculation for a third field called FullName that displays FirstName in orange and LastName in purple:
TextColor(FirstName;RGB(255;165;0)) &" "& TextColor(LastName;RGB(160;32;240))