OSL ‐ Colour Picker - Mistium/Origin-OS GitHub Wiki

About

Screenshot 2023-11-07 at 10 41 37

The color picker is a set of OSL commands that utilize the HTML system color picker for selecting colors within your program.

Interacting With The Colour Picker

  • colourpicker "show":

    • Displays the color picker interface.
  • colourpicker "setpos" x y:

    • Sets the location of the color picker on the screen.
  • colourpicker "setcol" #hexcode:

    • Sets the current color of the color picker to the specified hexadecimal color code.
  • colourpicker "getcol":

    • Retrieves the current color selected in the color picker and sets the variable picker_colour to that color.

Example Usage

colourpicker "show"
// Shows the color picker interface
colourpicker "setpos" 100 100
// Sets the position of the color picker to (100, 100)
colourpicker "setcol" #FF0000
// Sets the color picker's current color to red
colourpicker "getcol"
// Retrieves the current color from the color picker and stores it in the variable picker_colour