Theme JSON Reference
This page documents every field in theme.json and the full folder structure of a Cocoon theme. Use this if you’re building themes by hand or want to understand what the Theme Builder generates.
Folder Structure
A theme lives in a single folder inside your Cocoon/themes/ directory:
my-theme/
├── theme.json # Theme definition (required)
├── preview.png # Thumbnail for the picker (recommended)
├── wallpaper.png # Main wallpaper (top screen)
├── wallpaper_ext.png # External wallpaper (bottom screen)
├── sounds/
│ ├── navigate.wav
│ ├── select.wav
│ ├── back.wav
│ └── ... # One file per sound slot
├── icon_overlays/
│ └── {platform}/
│ ├── overlay.png
│ └── mask.png
├── smart/
│ ├── {folder-type}/
│ │ ├── icon.png
│ │ ├── hero.png
│ │ └── logo.png
│ └── {folder-type}/{platform}/
│ ├── icon.png
│ ├── hero.png
│ └── logo.png
└── music/
└── ... # Audio files
Asset packs use a simpler structure since they only contain one category.
theme.json
The root object in theme.json has these top-level fields:
{
"name": "My Theme",
"author": "YourName",
"version": "1.0",
"description": "A short description of the theme.",
"theme_mode": "DARK",
"color_scheme": { ... },
"wallpaper": "wallpaper.png",
"wallpaper_external": "wallpaper_ext.png",
"music": [ ... ],
"settings": { ... },
"volume": { ... },
"asset_refs": [ ... ]
}
All fields except name are optional.
Metadata
| Field | Type | Description |
|---|---|---|
name | string | Theme name shown in the picker. Required. |
author | string | Creator’s name or handle. |
version | string | Version string (e.g. "1.0", "2.3.1"). |
description | string | Short blurb shown in the picker and Silk Pod. |
Theme Mode
| Field | Type | Values |
|---|---|---|
theme_mode | string | "LIGHT", "DARK", "OLED", or "SYSTEM" |
Sets the base color mode. Custom colors in color_scheme are applied on top of this base.
Color Scheme
The color_scheme object controls every color in the UI. All fields are optional — omitted fields keep the user’s existing value.
Every value is a hex color string ("#RRGGBB" or "#AARRGGBB").
| Field | What it colors |
|---|---|
background_gradient_start | Main background gradient start |
background_gradient_end | Main background gradient end |
card_gradient_start | Card/panel gradient start |
card_gradient_end | Card/panel gradient end |
text_primary | Primary text |
text_secondary | Secondary/subtitle text |
icon_tint | Icon tint color |
tile_background | Grid tile background fill |
tile_border | Grid tile border |
toggle_off_gradient_start | Toggle (off state) gradient start |
toggle_off_gradient_end | Toggle (off state) gradient end |
toggle_thumb_gradient_start | Toggle thumb gradient start |
toggle_thumb_gradient_end | Toggle thumb gradient end |
drop_shadow | Drop shadow color |
inner_shadow_light | Inner shadow highlight |
inner_shadow_dark | Inner shadow dark |
success | Success state color |
warning | Warning state color |
divider | Divider/separator lines |
accent_gradient_start | Accent gradient start |
accent_gradient_end | Accent gradient end |
accent_glow | Accent glow effect |
Example:
"color_scheme": {
"background_gradient_start": "#1a1a2e",
"background_gradient_end": "#16213e",
"text_primary": "#ffffff",
"text_secondary": "#a0a0b0",
"accent_gradient_start": "#e94560",
"accent_gradient_end": "#c81d4e"
}
Wallpapers
| Field | Type | Description |
|---|---|---|
wallpaper | string | Relative path to the main (top screen) wallpaper. |
wallpaper_external | string | Relative path to the external (bottom screen) wallpaper. |
Supports PNG, JPG, WEBP, GIF, MP4, and WEBM. Video files loop automatically.
Music
The music field is an array of track objects for background music:
"music": [
{
"file": "music/morning.mp3",
"time_start": "06:00",
"time_end": "12:00"
},
{
"file": "music/afternoon.mp3",
"time_start": "12:00",
"time_end": "18:00"
}
]
Tracks can be time-scheduled (plays during a time window) or used in playlist mode.
Settings
The settings object controls display behavior. All fields are optional.
| Field | Type | Range | Default | Description |
|---|---|---|---|---|
iconRoundness | float | 0–0.5 | — | Corner roundness of game icons. 0 = square, 0.5 = fully rounded. |
iconScale | float | 0.5–1.0 | — | Size of game icons on the grid. |
hoverScale | float | 0.5–1.0 | — | Growth factor when a game icon is selected/hovered. |
heroDisplayStyle | string | — | — | "VIGNETTE", "FULLSCREEN", or "NONE". Controls how the hero image displays on the top screen. |
heroLogoScale | float | 0.1–1.0 | — | Size of the game logo on the top screen hero. |
heroFolderLogoScale | float | 0.1–1.0 | — | Size of the folder logo on the top screen hero. |
heroGradientStyle | string | — | — | "NONE" or "BLACK_GRADIENT". Overlay gradient on the hero area. |
Example:
"settings": {
"iconRoundness": 0.15,
"iconScale": 0.9,
"heroDisplayStyle": "FULLSCREEN",
"heroGradientStyle": "BLACK_GRADIENT"
}
Volume
| Field | Type | Description |
|---|---|---|
volume.sfx | float | Sound effects volume (0.0–1.0). |
volume.music | float | Background music volume (0.0–1.0). |
Asset References
The asset_refs array lets a theme reference external asset packs. When someone downloads the theme from Silk Pod, referenced packs are automatically downloaded too.
"asset_refs": [
{
"id": "pack-unique-id",
"name": "Cool Icon Pack",
"category": "icon_overlays",
"version": "1.0"
}
]
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the asset pack. |
name | string | Display name. |
category | string | "icon_overlays", "smart_folders", "sounds", or "music". |
version | string | Version of the referenced pack. |
Sound Effect Files
Place sound files in the sounds/ subfolder. Cocoon maps files by name (without extension). Use underscores in filenames.
| Filename | When it plays |
|---|---|
navigate | Cursor movement / D-pad navigation |
select | Confirming a selection (A button) |
back | Going back (B button) |
folder_open | Opening a smart folder |
folder_close | Closing a smart folder |
launch | Launching a game |
error | Error or invalid action |
notification | Toast / notification popup |
discord_open | Opening Discord Rich Presence overlay |
discord_close | Closing Discord Rich Presence overlay |
screen_swap | Swapping top and bottom screens |
grid_zoom_in | Zooming in on the game grid |
grid_zoom_out | Zooming out on the game grid |
reorder_pickup | Picking up a tile during reorder |
reorder_place | Placing a tile during reorder |
open_edit | Entering edit mode |
pop | Pop / bubble effect |
slider_increase | Increasing a slider value |
slider_decrease | Decreasing a slider value |
saving | Save operation started |
saving_end | Save operation completed |
retroachievements | RetroAchievements unlock notification |
Supported formats: WAV, MP3, OGG, FLAC.
Icon Overlays
Icon overlays live in icon_overlays/{platform}/:
icon_overlays/
├── gba/
│ ├── overlay.png # Drawn on top of game art
│ └── mask.png # White = visible, black = hidden
├── nds/
│ ├── overlay.png
│ └── mask.png
└── ...
Platform names match Cocoon’s internal platform identifiers (e.g. gba, nds, n64, psx, snes, etc.).
Smart Folder Assets
Smart folder assets live in smart/:
smart/
├── favorites/
│ ├── icon.png # Folder icon on the grid
│ ├── hero.png # Hero background (top screen)
│ └── logo.png # Logo/wordmark (top screen)
├── recent/
│ └── ...
├── most_played/
│ └── ...
└── favorites/gba/ # Per-platform override
├── icon.png
├── hero.png
└── logo.png
Folder type names match Cocoon’s smart folder identifiers. Per-platform subdirectories let you provide different art for each console within a folder.