Colour, Text and Effects
How an elbow looks once its shape is set: the fill colour, text on its bars, a texture in the fill and an animated background in the open area. Shapes and sizes are on Bars and Curves and Frames.
Colours
color paints the elbow: one colour, or a state map that changes with the card's entity. Set it on elbow.segment for a simple elbow or a frame, and on each segment of a segmented elbow.
On a segmented elbow a segment with its own
entity_idmatches its state map against that entity instead.Without a colour the elbow takes the theme's header colour, or its footer colour on the footer types.
A single colour is used in every state and doesn't change on hover. A state map keeps the theme's colours for the states it leaves out, including
hoverandpressed.Colours take everything described on the Colours page: CSS variables, theme tokens,
alpha()and other colour functions, and state keys such asactive,inactiveandunavailable.
type: custom:lcards-elbow
entity: light.kitchen
elbow:
type: header-left
segment:
bar_width: 90
bar_height: 20
color:
active: var(--lcars-orange)
inactive: alpha(var(--lcars-orange), 0.3)
hover: var(--lcars-yellow)
tap_action:
action: toggleMore about colours
- Theme tokens: the defaults are
components.elbow.header.backgroundandcomponents.elbow.footer.background. A theme can give one elbow type its own colours undercomponents.elbow.<type>.background, such ascomponents.elbow.diagonal-cap-left.background. - Frames: the outer ring uses
elbow.segment.colorand the inner ring of a segmented frame its owninner_frame.color. - Old key:
elbow.colors.backgroundstill works but is deprecated; useelbow.segment.color.
| Key | Type | Default | Description |
|---|---|---|---|
elbow.segment.color | colour / state map | the theme's header or footer colour | Fill of a simple elbow, or the outer ring of a frame |
elbow.segments.outer_segment.color | colour / state map | the theme's header or footer colour | Fill of the outer elbow of a segmented elbow; a state map follows the segment's entity_id, else the card's entity |
elbow.segments.inner_segment.color | colour / state map | the theme's header or footer colour | Fill of the inner elbow; a state map follows the segment's entity_id, else the card's entity |
interactive | boolean | true with an action or a switchable entity, else false | false turns off the hover and pressed colours |
Text labels
Elbows take the button's text fields, placed in named zones: on a bar, or in the open area inside the bars. A label on the top bar is the classic use.
- A field without a
zonegoes inbody, the open area. Setzone: horizontal_bar(orvertical_bar) to put it on a bar. positionplaces the text within its zone;top-rightinbodysits just under the bar.
type: custom:lcards-elbow
elbow:
type: header-left
segment:
bar_width: 120
bar_height: 22
color: var(--lcars-orange)
text:
section:
content: NAVIGATION
zone: horizontal_bar
position: right
font_size: 14
font_weight: bold
color: var(--lcars-black)
code:
content: "04-1173"
zone: vertical_bar
position: bottom-right
color: var(--lcars-black)
status:
content: ALL SYSTEMS NOMINAL
position: top-right
color: var(--lcards-moonlight)More about text zones
- Simple corners:
vertical_bar(also calledleft_barorright_bar),horizontal_bar,bodyandfull. - Open types:
horizontal_bar,bodyandfull. - Contained types:
left_bar,right_bar,horizontal_bar,bodyandfull. - Segmented:
outer_vertical_bar,inner_vertical_bar,outer_horizontal_bar,inner_horizontal_bar,bodyandfull. - Bar types:
bodyandfullare both the whole bar. - Frames:
top,bottom,left,right(for the sides it draws),bodyandfull. - Unknown zones: a field whose
zonethe elbow doesn't have goes inbody. The Zones section has pictures of each layout.
| Key | Type | Default | Description |
|---|---|---|---|
text.<name> | object | - | One text field: content, position, font_size, color and the other text field keys |
text.<name>.zone | string | body | The zone the field is placed in |
Shape texture
shape_texture draws a texture or animation inside the elbow's fill, clipped to its shape, such as a grid, a plasma wash or a scrolling pattern. It works as on the button card.
- On a segmented elbow the texture fills both elbows, and on a frame its ring (both rings on a segmented frame).
- The presets and their settings are listed on the button page: Shape texture.
type: custom:lcards-elbow
elbow:
type: header-left
segment:
bar_width: 90
bar_height: 24
color: var(--lcars-blue)
shape_texture:
preset: fluid
opacity: 0.5
mix_blend_mode: screen| Key | Type | Default | Description |
|---|---|---|---|
shape_texture.preset | string | - | grid, diagonal, hexagonal, dots, fluid, shimmer, plasma, flow, level, pulse, scanlines or image |
shape_texture.opacity | number / state map | - | Texture opacity, 0 to 1 |
shape_texture.speed | number / state map | - | Animation speed multiplier; 0 keeps it still |
shape_texture.mix_blend_mode | string | - | How the texture blends with the fill: normal, multiply, screen, overlay, hard-light, soft-light, color-burn or color-dodge |
shape_texture.config | object | - | The preset's own settings |
Background animation inset
background_animation.inset fits an animated background into the open area, so it doesn't run under the bars. inset: auto works the space out from the elbow's bars.
autofollows each type's arms: the top or bottom bar, and the side bar on its side. The contained types have a side bar on both sides, the open types none, and on the bar types the whole card is the bar, so nothing is inset.autokeeps up when the bars change, including bars bound to the HA-LCARS helpers.- Give px values per side instead when you want the background somewhere else.
- The effects themselves are described on Background animations.
type: custom:lcards-elbow
elbow:
type: header-left
segment:
bar_width: 90
bar_height: 20
color: var(--lcars-orange)
background_animation:
inset: auto # inside the bars
effects:
- preset: grid
config:
line_spacing: 40
color: alpha(var(--lcars-orange), 0.3)More about the inset
- Manual inset:
insetwithtop,left,rightandbottomin px; a side you leave out is0. For the example above that istop: 20andleft: 90. - Segmented and frames:
autocounts both elbows and the gap, or every side a frame draws (both rings on a segmented frame). - List form:
background_animationcan also be just the list of effects, with no inset.
| Key | Type | Default | Description |
|---|---|---|---|
background_animation.inset | string / object | none | auto: the open area inside the bars. An object: px per side |
background_animation.inset.top | number | 0 | Space at the top, px; right, bottom and left work the same |
background_animation.effects | list | - | The effects, drawn bottom to top: see Background animations |