input.color once, at the top level, and pass the result wherever a color is wanted. The first argument is the color the
control starts at; the second is its label.
input.color returns has the input
qualifier, which is accepted wherever a simple or series color is, and refused where a const is required (see const, input, simple and series).
Use the chosen color in a gradient or a fade
The chosen color goes intocolor.from_gradient and color.new like any other:
color.new runs from 0 (invisible) to 1 (solid), whatever color you pass.
The mistakes to avoid
na is refused too: Argument defval of input.color() cannot be na. Give the control a real default color, and choose
between colors with the controls’ values, as above. See Inputs and
Color and transparency.