### Base16 Builder Error Handling Example Source: https://context7.com/chriskempson/base16/llms.txt Demonstrates how to pipe an invalid YAML file to the base16-builder and redirect standard error to a log file. This is useful for debugging issues with scheme files. ```bash cat invalid-scheme.yaml | base16-builder --template vim.mustache > output.vim 2> error.log ``` -------------------------------- ### Complete Alacritty Terminal Theme Template (Mustache) Source: https://context7.com/chriskempson/base16/llms.txt A practical example of a Mustache template for generating an Alacritty terminal theme. It utilizes various Base16 template variables to define primary colors, cursor colors, selection colors, and normal/bright color palettes. ```mustache {{! templates/alacritty.mustache - Alacritty terminal theme }} # Base16 {{scheme-name}} # Author: {{scheme-author}} colors: primary: background: '#{{base00-hex}}' foreground: '#{{base05-hex}}' cursor: text: '#{{base00-hex}}' cursor: '#{{base05-hex}}' selection: text: '#{{base05-hex}}' background: '#{{base02-hex}}' normal: black: '#{{base00-hex}}' red: '#{{base08-hex}}' green: '#{{base0B-hex}}' yellow: '#{{base0A-hex}}' blue: '#{{base0D-hex}}' magenta: '#{{base0E-hex}}' cyan: '#{{base0C-hex}}' white: '#{{base05-hex}}' bright: black: '#{{base03-hex}}' red: '#{{base08-hex}}' green: '#{{base0B-hex}}' yellow: '#{{base0A-hex}}' blue: '#{{base0D-hex}}' magenta: '#{{base0E-hex}}' cyan: '#{{base0C-hex}}' white: '#{{base07-hex}}' ``` -------------------------------- ### Build Themes using CLI Source: https://context7.com/chriskempson/base16/llms.txt The Base16 builder uses a Unix-style pipeline to process scheme files via stdin and output generated themes. This supports batch processing of multiple schemes and templates through shell scripting. ```bash cat tomorrow-night.yaml | base16-builder --template vim.mustache > tomorrow-night.vim for scheme in schemes/*.yaml; do name=$(basename "$scheme" .yaml) cat "$scheme" | base16-builder --template templates/vim.mustache > "colors/base16-$name.vim" done ``` -------------------------------- ### Configure Base16 Template Output Source: https://context7.com/chriskempson/base16/llms.txt The template configuration file maps template files to specific output directories and file extensions. This allows builders to automate the generation of multiple theme variants from a single source. ```yaml default: extension: .vim output: colors 256: extension: .vim output: colors-256 ``` -------------------------------- ### Create Mustache Template for Themes Source: https://context7.com/chriskempson/base16/llms.txt Mustache templates use placeholders to interpolate color variables into application-specific syntax. The builder provides various formats for each color, including hex, RGB, and decimal values. ```mustache " Base16 {{scheme-name}} - Vim color scheme " Author: {{scheme-author}} let g:colors_name = "base16-{{scheme-slug}}" hi Normal guifg=#{{base05-hex}} guibg=#{{base00-hex}} hi Comment guifg=#{{base03-hex}} hi String guifg=#{{base0B-hex}} hi Keyword guifg=#{{base0E-hex}} hi Function guifg=#{{base0D-hex}} hi Variable guifg=#{{base08-hex}} ``` -------------------------------- ### Base16 Template Variables for Color Formatting (Mustache) Source: https://context7.com/chriskempson/base16/llms.txt Illustrates the various template variables available in Mustache for accessing color values in different formats (hex, RGB, decimal, HSL). These variables allow for flexible theme generation. ```mustache {{! Available variables for each base color (00-0F) }} {{! Scheme metadata }} {{scheme-name}} {{scheme-author}} {{scheme-slug}} {{! Hex formats - for CSS, most configs }} {{base0D-hex}} {{base0D-hex-bgr}} {{base0D-hex-r}} {{base0D-hex-g}} {{base0D-hex-b}} {{! RGB formats - integer 0-255 range }} {{base0D-rgb-r}} {{base0D-rgb-g}} {{base0D-rgb-b}} {{! Decimal formats - float 0-1 range }} {{base0Dec-r}} {{base0Dec-g}} {{base0Dec-b}} {{! HSL formats - for CSS hsl() functions }} {{base0D-hsl-h}} {{base0D-hsl-s}} {{base0D-hsl-l}} ``` -------------------------------- ### Define Template Configuration in config.yaml Source: https://github.com/chriskempson/base16/blob/main/file.md The config.yaml file instructs builders on how to process mustache templates. It maps template names to their respective file extensions and output directories. ```yaml default: extension: .file-extension output: output-directory-name additional: extension: .file-extension output: output-directory-name ``` -------------------------------- ### Base16 Color Role Assignments for Syntax Highlighting (YAML) Source: https://context7.com/chriskempson/base16/llms.txt Defines the standard color assignments for Base16 schemes, categorizing colors into shade colors for UI elements and accent colors for syntax highlighting. This YAML structure is commonly used for defining color palettes. ```yaml # Shade colors (background/foreground spectrum) # For dark themes: base00 = darkest, base07 = lightest # For light themes: base00 = lightest, base07 = darkest base00: "1d1f21" base01: "282a2e" base02: "373b41" base03: "969896" base04: "b4b7b4" base05: "c5c8c6" base06: "e0e0e0" base07: "ffffff" # Accent colors (syntax highlighting) base08: "cc6666" base09: "de935f" base0A: "f0c674" base0B: "b5bd68" base0C: "8abeb7" base0D: "81a2be" base0E: "b294bb" base0F: "a3685a" ``` -------------------------------- ### Define Color Scheme Structure Source: https://github.com/chriskempson/base16/blob/main/file.md Scheme files define the color palette using a YAML format. Each base color (base00-base0F) must be represented as a 6-character hexadecimal string without the '#' prefix. ```yaml scheme: "Scheme Name" author: "Scheme Author" base00: "000000" base01: "111111" base02: "222222" base03: "333333" base04: "444444" base05: "555555" base06: "666666" base07: "777777" base08: "888888" base09: "999999" base0A: "aaaaaa" base0B: "bbbbbb" base0C: "cccccc" base0D: "dddddd" base0E: "eeeeee" base0F: "ffffff" ``` -------------------------------- ### Define Base16 Color Scheme in YAML Source: https://context7.com/chriskempson/base16/llms.txt A Base16 scheme file defines the 16-color palette using hexadecimal values without hashes. It includes metadata like scheme name and author, along with 8 shade variations (base00-base07) and 8 accent colors (base08-base0F). ```yaml scheme: "Tomorrow Night" author: "Chris Kempson (http://chriskempson.com)" base00: "1d1f21" base01: "282a2e" base02: "373b41" base03: "969896" base04: "b4b7b4" base05: "c5c8c6" base06: "e0e0e0" base07: "ffffff" base08: "cc6666" base09: "de935f" base0A: "f0c674" base0B: "b5bd68" base0C: "8abeb7" base0D: "81a2be" base0E: "b294bb" base0F: "a3685a" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.