Section Colors
Color utility functions.
Summary
| Return type | Function and summary |
|---|---|
| string, string, int | ChooseColor(string object, table suggestedColors, selected) Ask the user to choose one color in a menu. |
Function
ChooseColor(string object, table suggestedColors, selected)
Ask the user to choose one color in a menu.

"Staff background").
Then, a list of suggested colors (e.g. found in score).
Then, the ability to pick a new color from the Color Picker, and save it to favorites for faster use next times.
| Parameter | Type | Default | Description |
|---|---|---|---|
| object | string | The name you want, e.g. "Staff background", "Staff lines"... | |
| suggestedColors | table | nil | A table of string in [#]RRGGBB format (recommanded), or number color index |
| selected | A string in [#]RRGGBB format or number color index |
- Returns
- string: Choosen color, in RRGGBB format, or
nilif user canceled the choice. - string: Choosen color, in #RRGGBB format, or
nilif user canceled the choice. - int: Color index, or nearest in 256 colors palette, or
nilif user canceled the choice.