Category: Text Formatting
Syntax: TextColor ( text; RGB ( red; green; blue ) ) |
Parameters:
textAny text string or expression that returns a text string.
RGB (red;green;blue)A function that accepts three parameters from 0 to 255 and returns a number representing a color. See the RGB() definition.
Data type returned: Text
Description:
Returns the text string in the color specified by the RGB parameter. Use the TextColor() function within text expressions to emphasize words:
"We will have " & TextColor (NumberItems;RGB (255;0;0)) & " errors per cycle. Unacceptable!"
TextColor() can also be used for conditional text formatting. The following calculation highlights losses in red:
Let (Profit = GetAsText (Earnings Expenditures); Case ( Profit > 0; TextColor (Profit; RGB(0;0;0)); Profit < 0; TextColor (Profit; RGB(255;0;0)); "") )
If a field is formatted in the Number Format dialog, some options override the TextColor() function. For example, conditional color for negative numbers overrides TextColor, unless the user has clicked into the field being formatted.
Examples:
Function | Results |
---|---|
TextColor ("this text will be blue"; RGB (0;0;255)) | Returns this text will be blue, formatted in blue. |
TextColor ("this text will be red"; 16711680) | Returns this text will be red, formatted in red. |
: FileMaker Specifications
FileMaker 8 Product Line
Specifications and Storage Limits
Field Types and Import/Export Formats
: Calculation Functions
Working with Calculations Primer
Calculation Signatures
Calculation Functions
: Custom Functions
Custom Functions Primer
Useful Custom Functions
: Script Steps
Scripting Primer
Script Step Reference
: Quick Reference
FileMaker Error Codes
FileMaker Keyboard Shortcuts
FileMaker Network Ports
FileMaker Server Command Line Reference
FileMaker XML Reference
: Other Resources
Where to Go for More Information