std/theme

named colors

Ink, Paper, Line, Quiet, Accent, Good, Warning, Critical: one-word color phrases, look context. Default values (the Synod brand):

Name Value Use
Paper #151A2E scene ground
Ink #EDE9E1 node cards, primary text
Line #3A4366 links, borders
Quiet #8A90A8 secondary text, idle nodes
Accent #F4A340 messages, the one thing to look at
Good #5CC8B8 success, committed
Warning #E8C35A candidate, pending
Critical #E86F5A broken invariant, crashed

Phrases

theme.Paper

scene ground

Gives
color
Contexts
look
Kind
phrase, written in Synod
Source
theme/theme.synod:3
Examples
theme/palette

theme.Ink

node cards, primary text

Gives
color
Contexts
look
Kind
phrase, written in Synod
Source
theme/theme.synod:7
Examples
theme/palette

theme.Line

links, borders

Gives
color
Contexts
look
Kind
phrase, written in Synod
Source
theme/theme.synod:11
Examples
theme/palette

theme.Quiet

secondary text, idle nodes

Gives
color
Contexts
look
Kind
phrase, written in Synod
Source
theme/theme.synod:15
Examples
theme/palette

theme.Accent

messages, the one thing to look at

Gives
color
Contexts
look
Kind
phrase, written in Synod
Source
theme/theme.synod:19
Examples
theme/palette

theme.Good

success, committed

Gives
color
Contexts
look
Kind
phrase, written in Synod
Source
theme/theme.synod:23
Examples
theme/palette

theme.Warning

candidate, pending

Gives
color
Contexts
look
Kind
phrase, written in Synod
Source
theme/theme.synod:27
Examples
theme/palette

theme.Critical

broken invariant, crashed

Gives
color
Contexts
look
Kind
phrase, written in Synod
Source
theme/theme.synod:31
Examples
theme/palette

Examples

palette

Shows every theme color (Paper, Ink, Line, Quiet, Accent, Good, Warning, Critical) as a swatch

# package main
# Shows every theme color (Paper, Ink, Line, Quiet, Accent, Good, Warning, Critical) as a swatch
use example.com/library/theme/palette
use std/sim

define main
  sim.StopAt 1s
# package palette
use std/look
use std/sim
use std/theme

# One swatch per theme color, in a row
when sim.Started
  draw (look.Rect 1592 by 992) as ground
  look.Fill ground with theme.Paper
  look.Stroke ground with theme.Line
  draw (look.Rect 100 by 100) as ink
  look.Fill ink with theme.Ink
  draw (look.Rect 100 by 100) as quiet
  look.Fill quiet with theme.Quiet
  look.Place quiet beside ink
  draw (look.Rect 100 by 100) as accent
  look.Fill accent with theme.Accent
  look.Place accent beside quiet
  draw (look.Rect 100 by 100) as good
  look.Fill good with theme.Good
  look.Place good beside accent
  draw (look.Rect 100 by 100) as warning
  look.Fill warning with theme.Warning
  look.Place warning beside good
  draw (look.Rect 100 by 100) as critical
  look.Fill critical with theme.Critical
  look.Place critical beside warning