Theme generator for Flynt. Write one template per app, generate all variants.
brew tap flynt-theme/tap
brew install strikeOr with Go:
go install github.com/flynt-theme/strike/cmd/strike@lateststrike build <template> [flags]
Flags:
--palette Path or URL to palette.json (default: flynt-theme/flynt on GitHub)
--out Output directory (default: template directory)
--combined Render once with both dark and light contexts (for single-file themes)
--check Exit non-zero if outputs are stale, without writingExample - build from a local palette:
strike build theme.yaml.tmpl --palette ../flynt/palette.jsonExample - single-file theme (e.g. Obsidian):
strike build theme.css.tmpl --combinedExample - CI check (verify committed files match the template):
strike build theme.yaml.tmpl --checkTemplates are plain text files with a YAML frontmatter block:
---
output: flynt-{{ .variant }}.yaml
---
# file body — any format, rendered as a Go template
accent: '{{ .amber }}'
background: '{{ .bg }}'
foreground: '{{ .tx }}'
Strike renders one output file per palette variant (dark, light). The output line is itself a template - use .variant to produce separate filenames.
| Variable | Example values |
|---|---|
.variant |
dark, light |
.label |
Flynt Dark, Flynt Light |
| Variable | Token |
|---|---|
.bg |
bg |
.bg2 - .bg5 |
bg-2 through bg-5 |
.tx |
tx |
.tx2 - .tx5 |
tx-2 through tx-5 |
All values are hex strings with a # prefix (e.g. #100E0C).
.ember .clay .amber .moss .fern .teal .delft .iris .plum .rose
{{ index (index .shades "amber") "400" }}
Available shades: 50 100 150 200 300 400 500 600 700 800 850 900 950
| Function | Example | Output |
|---|---|---|
hex2rgb |
{{ hex2rgb .amber }} |
198,159,42 |
hex2rgbf |
{{ hex2rgbf .amber }} |
0.7765 0.6235 0.1647 |
hexchan |
{{ hexchan .amber "r" }} |
0.7765 |
nohash |
{{ nohash .amber }} |
C69F2A |
shade |
{{ shade .dark.shades "amber" "400" }} |
hex string |
lower |
{{ lower .variant }} |
dark |
upper |
{{ upper .label }} |
FLYNT DARK |
hexchan accepts "r", "g", or "b" as the channel argument. Useful for formats like iTerm2 that need each component on a separate line.
MIT - Flynt Theme