Skip to content

theme.rk ​

Layer 6: colours, type and density for an installation or one organisation. Starts from a template (extends) and overrides tokens. Light and dark are always both produced; overriding one colour derives its dark pair unless given.

Lives in <site>/themes/<name>.rk · Schema theme.json (source) · first line: # yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/theme.json

Properties ​

PropertyTypeMeaning
name requirednamesnake_case, never renamed once released
pattern ^[a-z][a-z0-9_]{0,62}$
labellabelA label in Bahasa Indonesia (required) and optionally English.
label.id requiredstring
label.enstring
extendsstringTemplate, e.g. rangka/standard, rangka/retail, rangka/clinic
default "rangka/standard", pattern ^[a-z0-9_-]+/[a-z0-9_-]+$
modelight · dark · system
default "system"
colormap of string or objectToken overrides by token name (primary, selected, brand, chart-1…). A string sets light and derives dark; an object sets both.
fontobject
font.sansstring
font.displaystring
font.monostring
radiussharp · standard · round
default "standard"
densitycompact · standard · comfortable
default "standard"
logoobject
logo.lightstring
logo.darkstring
logo.markstring
contrast_checkbooleanRefuse overrides that drop text below 4.5:1 or controls below 3:1
default true

Example ​

From rangka-apps/examples/sites/kopi-senja/themes/kopi_senja.rk (first 60 lines):

yaml
# yaml-language-server: $schema=https://rangka-os.github.io/rangka-os/schema/0.5/theme.json
name: kopi_senja
label: {id: Kopi Senja}
extends: rangka/standard
mode: system
color:
  brand: '#9a5b2e'
  chart-1: '#0c66e4'
radius: standard
density: standard

Generated from the schema by website/scripts/gen-reference.mjs. Edit the schema, not this page.

Rangka OS is source-available under the Elastic License 2.0 (ELv2). Free to self-host.