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.icon

show an icon, optionally colored statically or dynamically by item

Parameters
{{ basic.icon(pic, color, item, type) }}
pic
icon to show
color
the color in any CSS form (e.g. '#f00' for red) or 'icon1' (default 'icon0' of the design)
To use dynamic coloring by item give one of the following color models: 'rgb', 'hsl' or 'hsv'
item
either one item which sends all three color parts as array or an array of three items each sending one of the color parts.
type
icon type / size. valid types: 'micro','mini','midi','icon' (optional, default = 'icon')
Examples
Simple static icon
{{ basic.icon('light_light') }}
light_light
Colored icon
{{ basic.icon('light_light', '#0b0') }}
{{ basic.icon(icon.light('','','bath.light.value'), 'icon1') }}
light_light
Dynamically colored icon
{{ basic.icon('light_light', 'rgb', ['bath.color.r', 'bath.color.g', 'bath.color.b']) }}
{{ basic.icon(icon.light('','','bath.light.value'), 'rgb', ['bath.color.r', 'bath.color.g', 'bath.color.b']) }}
Use this color selector to change icon color.
light_light
New in v3.0: icon sizes may be altered
{{ basic.icon('light_light', 'rgb', ['bath.color.r', 'bath.color.g', 'bath.color.b'], 'micro') }}
{{ basic.icon('light_light', 'rgb', ['bath.color.r', 'bath.color.g', 'bath.color.b'], 'mini') }}
{{ basic.icon('light_light', 'rgb', ['bath.color.r', 'bath.color.g', 'bath.color.b'], 'midi') }}
{{ basic.icon('light_light', 'rgb', ['bath.color.r', 'bath.color.g', 'bath.color.b'], 'icon') }}
light_light light_light light_light light_light

Author: Stefan Widmer

Widgets

Design

Misc