Documentation

Tach with a redline

A dial with ticks, a needle, and a red zone that only lights when the value is in it.

Tach with a redline: the urdeck.widgets.stats widget at 4x4.
The urdeck.widgets.stats widget at 4x4, drawn by UrDeck from this theme.

The theme

This is the theme.json of the recipe, exactly as it is in the repository (site/cookbook/tach-redline/). Save it as themes/my-theme/theme.json next to UrDeck.Host.exe and set "theme": "my-theme", or copy the keys you like into your own theme.

{
  "$schema": "https://urdeck.app/schemas/v1/theme.json",
  "meta": {
    "name": "Tach with a redline",
    "description": "Dial gauges with ticks, a needle and a red zone that lights when the load is high.",
    "mode": "dark"
  },
  "colors": {
    "cardFill": "#140d09",
    "accent": "#ffb347",
    "critical": "#ff3b2a"
  },
  "gauge": {
    "style": "tach",
    "sweep": { "start": 135, "span": 270 },
    "ticks": { "count": 28, "majorEvery": 4, "length": 0.07, "thickness": 0.01, "color": "#33ffffff" },
    "redline": {
      "from": 0.8,
      "color": "#ff3b2a",
      "lightsAbove": true,
      "glow": { "blur": 0.07, "alpha": 0.7 }
    },
    "marker": { "shape": "needle", "size": 0.05, "color": "#ffb347" }
  }
}

How it works

gauge.style tach is an arc with ticks, a redline and a needle. The other keys decide how much of that you see.

  • gauge.sweep is the arc: start in degrees (0 is 3 o’clock, clockwise) and span, how many degrees it covers. 135 and 270 are the ring’s own; a smaller span gives a speedometer.
  • gauge.ticks sets the marks: count of them, every majorEvery-th one longer. A tach has 28 ticks and a redline from 0.85 even if the theme sets none; writing the group is for changing them.
  • gauge.redline.from is where the zone starts, as a fraction of the scale. With lightsAbove the zone lights only while the value is inside it, so it is dark most of the time and a warning when it matters. glow blurs a copy of it.
  • gauge.marker needle draws the pointer; the other shape is a diamond.

The needle’s color and colors.accent are the same amber so the dial reads as one object. colors.critical is the colour a gauge turns once a reading passes its critical level, which a slot’s critical setting decides.

All recipes · Theme reference