Documentation

Chamfered cards

Cut two corners of every card with a straight line, and outline them.

Chamfered cards: the sample page.
The sample page, 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/chamfered-cards/). 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": "Chamfered cards",
    "description": "Cards with two cut corners and a thin amber outline.",
    "mode": "dark"
  },
  "colors": {
    "cardFill": "#1a120c",
    "cardBorder": "#ffb347",
    "accent": "#ffb347",
    "accentDim": "#33ffb347"
  },
  "card": {
    "shape": "chamfer",
    "cut": 0.12,
    "cutCorners": ["tr", "bl"],
    "borderWidth": 0.008,
    "gap": 0.07
  }
}

How it works

card.shape is round by default, a rounded rectangle of card.radius. chamfer replaces the rounded corners with straight cuts, and card.radius stops mattering: the corners that are not cut are square.

  • card.cut is how long the cut is along each side, a fraction of a grid cell. It is limited to half of the card’s smaller side, so a small card never gets a cut larger than itself.
  • card.cutCorners names the corners to cut: tl, tr, br, bl. ["tr", "bl"] is the diagonal pair that gives the look; an empty list gives square cards.
  • The border follows the cut. colors.cardBorder is transparent in the default theme, so the recipe sets a colour and a card.borderWidth of 0.008 of a cell (about 2 pixels on the panel it was made for). A border of 0 draws nothing.
  • The widget’s content is clipped to the shape, so a clock or a gauge never pokes out of a cut corner.

The fill is opaque on purpose: the text is measured against it, and urdeck-cli theme validate reports any pair under 4.5:1. Try "cut": 0.2 for a sharper look, or all four corners for an octagon.

All recipes · Theme reference