Basic-Widgets

basic.checkbox basic.color basic.flip basic.glue basic.icon basic.input basic.listview basic.offset basic.print basic.select basic.shutter basic.slider basic.roundslider basic.stateswitch basic.symbol basic.tank basic.trigger basic.window basic.shifter


basic.color

Displays a color selector

Parameters
{{ basic.color(id, item_r_h, item_g_s, item_b_l_v, min, max, steps, colors, style, colormodel) }}
id
unique id for this widget (optional)
item_r_h
an item for the red value in RGB model or hue in HSL and HSV model, or single item containing list of all color values
item_g_s
an item for the green value in RGB model or saturation in HSL and HSV model
(to let blank if first item contains list of all values)
item_b_l_v
an item for the blue value in RGB model or lightness in HSL model / brightness in HSB model
(to let blank if first item contains list of all values)
min
minimum value if the light is off; single value or list of values for each component (optional, default 0)
max
maximum value if the light is full on; single value or list of values for each component (optional, default 255 for rgb, [360,100,100] for hsl & hsv)
steps
number of shades per color (optional, default 7)
colors
number of colored segments (optional, default 10)
style
'disc' for circular, 'rect' for rectangular view, 'slider' for HSV sliders (optional, default: disc)
colormodel
possible values: 'rgb', 'hsl' and 'hsv' (optional, default: rgb)
Examples
Circular view
{{ basic.color('', 'bath.color.r', 'bath.color.g', 'bath.color.b') }}
{{ basic.color('', 'bath.color.r', 'bath.color.g', 'bath.color.b', '', '', 6, 8) }}
{{ basic.color('', 'bath.color.r', 'bath.color.g', 'bath.color.b', 0, 255, 15, 19) }}
7 steps and 10 colors (default) 6 steps and 8 colors 15 steps and 19 colors
Rectangular view
{{ basic.color('', 'bath.color.r', 'bath.color.g', 'bath.color.b', '', '', '', '', 'rect') }}
{{ basic.color('', 'bath.color.r', 'bath.color.g', 'bath.color.b', '', '', 6, 8, 'rect') }}
7 steps and 10 colors (default) 6 steps and 8 colors
Slider view (the sliders show hue, saturation and brightness)
{{ basic.color('', 'bath.color.r', 'bath.color.g', 'bath.color.b', '', '', '', '', 'slider') }}
HSL and HSV color space
{{ basic.color('', 'bath.color.h', 'bath.color.s', 'bath.color.l', '', '', '', '', 'rect', 'hsl') }}
{{ basic.color('', 'bath.color.h', 'bath.color.s', 'bath.color.v', '', '', '', '', '', 'hsv') }}
Values as list in a single item
{{ basic.color('', 'bath.color.rgb') }}

Author: Martin Gleiß and Stefan Widmer
inspired by Marcus Popp

Widgets

Design

Misc