### Install Ayu Dark Theme for OpenCode Source: https://context7.com/postrednik/opencode-ayu-theme/llms.txt This bash script installs the Ayu Dark Theme by creating the necessary directory, downloading the theme file using curl, and configuring OpenCode to use the theme by adding an entry to `opencode.json`. Finally, it prompts the user to restart OpenCode. ```bash # Create the themes directory mkdir -p ~/.config/opencode/themes # Download the theme file curl -o ~/.config/opencode/themes/ayu-dark.json \ https://raw.githubusercontent.com/postrednik/opencode-ayu-theme/main/.opencode/themes/ayu-dark.json # Add theme configuration to opencode.json cat > ~/.config/opencode/opencode.json << 'EOF' { "theme": "ayu-dark" } EOF # Restart OpenCode to apply the theme ``` -------------------------------- ### Configure OpenCode Theme (JSON) Source: https://github.com/postrednik/opencode-ayu-theme/blob/main/README.md This JSON snippet shows how to configure OpenCode to use the installed Ayu Dark theme. It should be added to the `~/.config/opencode/opencode.json` file. ```json { "theme": "ayu-dark" } ``` -------------------------------- ### Create OpenCode Themes Directory (Bash) Source: https://github.com/postrednik/opencode-ayu-theme/blob/main/README.md This command creates the necessary directory structure for OpenCode themes if it does not already exist. It uses `mkdir` with the `-p` flag to ensure parent directories are also created. ```bash mkdir -p ~/.config/opencode/themes ``` -------------------------------- ### Download Ayu Dark Theme File (Bash) Source: https://github.com/postrednik/opencode-ayu-theme/blob/main/README.md This command downloads the Ayu Dark theme JSON file from a remote URL using `curl` and saves it to the OpenCode themes directory. The `-o` flag specifies the output file path. ```bash curl -o ~/.config/opencode/themes/ayu-dark.json https://raw.githubusercontent.com/postrednik/opencode-ayu-theme/main/.opencode/themes/ayu-dark.json ``` -------------------------------- ### Configure Syntax Highlighting Colors with Ayu Theme Source: https://context7.com/postrednik/opencode-ayu-theme/llms.txt Specifies color definitions for syntax highlighting across all supported programming languages in OpenCode. This JSON configuration maps semantic token types (comment, keyword, function, string, etc.) to specific Ayu color names for both dark and light themes. ```json { "theme": { "syntaxComment": { "dark": "ayuComment", "light": "ayuComment" }, "syntaxKeyword": { "dark": "ayuKeyword", "light": "ayuKeyword" }, "syntaxFunction": { "dark": "ayuFunc", "light": "ayuFunc" }, "syntaxVariable": { "dark": "ayuTag", "light": "ayuTag" }, "syntaxString": { "dark": "ayuString", "light": "ayuString" }, "syntaxNumber": { "dark": "ayuConstant", "light": "ayuConstant" }, "syntaxType": { "dark": "ayuEntity", "light": "ayuEntity" }, "syntaxOperator": { "dark": "ayuOperator", "light": "ayuOperator" }, "syntaxPunctuation": { "dark": "ayuFg", "light": "ayuUiFg" } } } ``` -------------------------------- ### Customize Theme Elements in OpenCode JSON Source: https://context7.com/postrednik/opencode-ayu-theme/llms.txt This JSON snippet demonstrates how to customize specific theme tokens within OpenCode's theme configuration. It maps various UI elements like primary, secondary, error, and background to predefined color definitions (e.g., `ayuAccent`, `ayuBg`), allowing for fine-grained control over the theme's appearance. ```json { "theme": { "primary": { "dark": "ayuAccent", "light": "ayuAccent" }, "secondary": { "dark": "ayuEntity", "light": "ayuEntity" }, "error": { "dark": "ayuError", "light": "ayuError" }, "warning": { "dark": "ayuKeyword", "light": "ayuKeyword" }, "success": { "dark": "ayuAdded", "light": "ayuAdded" }, "info": { "dark": "ayuTag", "light": "ayuTag" }, "background": { "dark": "ayuBg", "light": "ayuFg" }, "backgroundPanel": { "dark": "ayuPanelBg", "light": "ayuGutter" }, "backgroundElement": { "dark": "ayuEditorBg", "light": "ayuUiFg" }, "border": { "dark": "ayuBorder", "light": "ayuGutter" }, "borderActive": { "dark": "ayuAccent", "light": "ayuAccent" } } } ``` -------------------------------- ### Style Input Area and Prompts with Ayu Theme Source: https://context7.com/postrednik/opencode-ayu-theme/llms.txt Configures the visual appearance of the command input area and prompts within OpenCode. This JSON object defines colors for the input background, border, active border, prompt text, cursor, and input text, supporting both dark and light themes. ```json { "theme": { "inputBackground": { "dark": "ayuEditorBg", "light": "ayuFg" }, "InputBorder": { "dark": "ayuBorder", "light": "ayuGutter" }, "InputBorderActive": { "dark": "ayuAccent", "light": "ayuAccent" }, "inputPrompt": { "dark": "ayuAccent", "light": "ayuAccent" }, "inputCursor": { "dark": "ayuAccent", "light": "ayuAccent" }, "inputText": { "dark": "ayuFg", "light": "ayuUiFg" } } } ``` -------------------------------- ### Configure Diff View Colors in OpenCode JSON Source: https://context7.com/postrednik/opencode-ayu-theme/llms.txt This JSON configuration allows for the customization of colors used in Git diff displays and code change highlighting within OpenCode. It defines specific colors for added, removed, and context lines, as well as their backgrounds and line numbers, using predefined Ayu theme color tokens. ```json { "theme": { "diffAdded": { "dark": "ayuAdded", "light": "ayuAdded" }, "diffRemoved": { "dark": "ayuRemoved", "light": "ayuRemoved" }, "diffContext": { "dark": "ayuComment", "light": "ayuComment" }, "diffHunkHeader": { "dark": "ayuUiFg", "light": "ayuUiFg" }, "diffHighlightAdded": { "dark": "ayuAdded", "light": "ayuAdded" }, "diffHighlightRemoved": { "dark": "ayuRemoved", "light": "ayuRemoved" }, "diffAddedBg": { "dark": "#1a2618", "light": "#e4f0fb" }, "diffRemovedBg": { "dark": "#2a1a1a", "light": "#fbe4e4" }, "diffContextBg": { "dark": "ayuEditorBg", "light": "ayuGutter" }, "diffLineNumber": { "dark": "ayuGutter", "light": "ayuUiFg" }, "diffAddedLineNumberBg": { "dark": "#1a2618", "light": "#e4f0fb" }, "diffRemovedLineNumberBg": { "dark": "#2a1a1a", "light": "#fbe4e4" } } } ``` -------------------------------- ### Ayu Dark Theme JSON Structure for OpenCode Source: https://context7.com/postrednik/opencode-ayu-theme/llms.txt This JSON defines the structure of the Ayu Dark Theme for OpenCode. It includes color definitions for various UI elements and syntax highlighting, adhering to the OpenCode theme schema. The theme primarily uses dark variants with specific hex color codes for backgrounds, foregrounds, and accents. ```json { "$schema": "https://opencode.ai/theme.json", "defs": { "ayuBg": "#0D1017", "ayuFg": "#BFBDB6", "ayuAccent": "#E6B450", "ayuError": "#D95757", "ayuString": "#AAD94C", "ayuFunc": "#FFB454", "ayuEntity": "#59C2FF", "ayuKeyword": "#FF8F40", "ayuComment": "#626d7a" }, "theme": { "primary": { "dark": "ayuAccent", "light": "ayuAccent" }, "background": { "dark": "ayuBg", "light": "ayuFg" }, "text": { "dark": "ayuFg", "light": "ayuUiFg" }, "syntaxKeyword": { "dark": "ayuKeyword", "light": "ayuKeyword" }, "syntaxString": { "dark": "ayuString", "light": "ayuString" }, "syntaxFunction": { "dark": "ayuFunc", "light": "ayuFunc" } } } ``` -------------------------------- ### Ayu Color Palette Reference in JSON Source: https://context7.com/postrednik/opencode-ayu-theme/llms.txt This JSON object provides a comprehensive reference to the Ayu color palette used in the theme. It categorizes colors for backgrounds, foregrounds, accents, syntax highlighting, diff views, and general UI elements, specifying hex codes for each. ```json { "backgrounds": { "main": "#0D1017", "editor": "#10141C", "panel": "#141821", "line": "#161A24" }, "foregrounds": { "primary": "#BFBDB6", "ui": "#555E73", "gutter": "#6C7380" }, "accents": { "primary": "#E6B450", "active": "#805600" }, "syntax": { "keyword": "#FF8F40", "function": "#FFB454", "string": "#AAD94C", "type": "#59C2FF", "tag": "#39BAE6", "constant": "#D2A6FF", "regexp": "#95E6CB", "markup": "#F07178", "operator": "#F29668", "comment": "#626d7a" }, "diff": { "added": "#70BF56", "modified": "#73B8FF", "removed": "#F26D78" }, "ui": { "error": "#D95757", "border": "#1B1F29", "selection": "#3388FF40" } } ``` -------------------------------- ### Style Markdown Content with Ayu Theme Colors Source: https://context7.com/postrednik/opencode-ayu-theme/llms.txt Defines color mappings for various markdown elements (text, headings, links, code blocks, etc.) within OpenCode conversations and documentation. This configuration uses a JSON object to specify distinct colors for dark and light themes. ```json { "theme": { "markdownText": { "dark": "ayuFg", "light": "ayuUiFg" }, "markdownHeading": { "dark": "ayuKeyword", "light": "ayuKeyword" }, "markdownLink": { "dark": "ayuEntity", "light": "ayuEntity" }, "markdownLinkText": { "dark": "ayuTag", "light": "ayuTag" }, "markdownCode": { "dark": "ayuString", "light": "ayuString" }, "markdownBlockQuote": { "dark": "ayuComment", "light": "ayuComment" }, "markdownEmph": { "dark": "ayuMarkup", "light": "ayuMarkup" }, "markdownStrong": { "dark": "ayuFunc", "light": "ayuFunc" }, "markdownHorizontalRule": { "dark": "ayuBorder", "light": "ayuGutter" }, "markdownListItem": { "dark": "ayuAccent", "light": "ayuAccent" }, "markdownCodeBlock": { "dark": "ayuFg", "light": "ayuUiFg" }, "markdownImage": { "dark": "ayuConstant", "light": "ayuConstant" } } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.