Color Picker

OSL provides a built-in color picker interface that utilizes the HTML system color picker for selecting colors in your applications.

Color Picker

Available Commands

Show Color Picker

Displays the color picker interface:

Set Position

Positions the color picker at specific screen coordinates:

Set Color

Sets the current color of the picker:

Get Color

Retrieves the currently selected color:

Example Usage

Interactive Example

Important Notes

  • The color picker uses the native HTML color picker interface

  • Selected colors are stored in the picker_colour variable

  • Colors are in hexadecimal format (#RRGGBB)

  • Position coordinates are relative to the window

  • The color picker remains visible until hidden

  • Changes to the color are immediate

Last updated

Was this helpful?