FYI, input
with type: "color"
has been available since release 2.3.1 and sounds like what was asked:
input name: "myColor", type: "color", title: "Choose color"
(probably looks a bit better if you add width:
and put it next to something else, but that's the idea)
The resulting value will be saved to settings as RGB in hex, e.g., #AA11BB, but can be converted to other formats (e.g., HSL) as needed with built-in helpers or whatever code you create.