Theme Templates ​
Rong uses Go’s text/template to render themes from Material colors. Go's templates provide simple yet powerful syntax to generate templates.
Built-In ​
Rong has a list of built-in templates for common formats. Checks output of built-in templates:
rong color teal
ls ~/.local/state/rong/For example, there is a built-in template for bash. You can use that in your shell script:
source ~/.local/state/rong/colors.bash
echo "$PRIMARY"Custom Templates ​
You can create your own templates use Golang's templates syntax. Templates are rendered using structured color data; you can find the available variables in the template context.
Once you're familiar with the template syntax and execution data, follow these steps:
Write the template
Create your file in
~/.config/rong/templates/using the.tmplextension.Example:
bashmkdir -p ~/.config/rong/templates echo ' 0: {{ .Primary }} 1: {{ .Secondary }} 2: {{ .Tertiary }} ' > ~/.config/rong/templates/my_theme.ext.tmplGenerate the theme
Generate themes from a color, image or video:
bashrong color cyanInspect the output:
bashcat ~/.local/state/rong/my_theme.exttext0: #D19488 1: #E7BDB5 2: #FFF8F3Link it
Add an entry in
configto copy/link/install the theme to your desired location. See configuration.