# Metadata
Platforms: desktop, server, mobile OS: mac, windows, linux, ios, android Introduced: 1.0 Security:
# Syntax
set the hiliteColor [of object] to {empty | colorName | RGBColor}
# Examples
set the hiliteColor of field "Comments" to "red"
set the hiliteColor of button ID 3 to "#336633"
set the hiliteColor to 255,255,0
# Description
Use the hiliteColor property to specify the background color of the select text in a field, or the highlight color of a clicked object.
Setting the hiliteColor of an object to empty allows the hiliteColor of the object owner to show through. Use the effective keyword to find out what color is used for the object, even if its own hiliteColor is empty.
The setting of the hiliteColor property has different effects, depending on the object type:
* The hiliteColor of a stack, card, or group determines the hiliteColor of any object in the stack, card, or group that does not have its own hiliteColor.
* The hiliteColor of a button is used for the background of the button when it is highlight. If the button is a menu, the hiliteColor is used to highlight the button, but not the active menu choice. The hiliteColor has no effect if the button is a tabbed button. The hiliteColor has no effect until the button is highlight.
>*Cross-platform note:* If the lookAndFeel is set to > "Appearance Manager", standard and rectangle buttons > are drawn by the operating system if the backgroundColor and > backgroundPattern of the button and all of its > owners is empty. In this case, the button > hiliteColor has no effect. Otherwise, the button is drawn > by LiveCode. If the lookAndFeel is "Appearance Manager", > button menus whose menuMode is set to "option" are > always drawn by the operating system, and the setting of the > button hiliteColor does not affect them.
* The hiliteColor of a field determines the background color of text selections in the field. If the hiliteColor of the field and all its owners is empty, the global hiliteColor property is used.
* The hiliteColor of a scrollbar fills the arrow boxes at the ends of the scrollbar when the arrows are clicked. The hiliteColor has no effect until the arrows are clicked.
* The hiliteColor of a graphic outlines its marker shapes. (The hiliteColor has no effect unless the graphic style is "curve" or "polygon" and its markerDrawn property is true.)
* The hiliteColor of a player or EPS has no effect.
* The hiliteColor of an image is the third color in the image color palette.
If the object's hilitePattern is set, the pattern is shown instead of the color specified by hiliteColor.
The global hiliteColor property specifies the background color of select text in fields whose hiliteColor is empty, but does not affect other highlight objects.
# Tags
ui,
# See
- **keyword:** effective, field, button, menu, card, player, scrollbar, graphic, image - **property:** hiliteFill, topColor, armFill, markerLineSize, backgroundPattern, menuMode, backgroundColor, style, lookAndFeel, markerDrawn - **command:** global, group - **object:** button, image, field, stack, graphic - **glossary:** object, selection, property, select, tabbed button, highlight, object type, color reference, integer, color palette, button menu, keyword, hexadecimal, EPS, owner