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

FieldTypeDescription
namestringTheme name shown in the picker. Required.
authorstringCreator’s name or handle.
versionstringVersion string (e.g. "1.0", "2.3.1").
descriptionstringShort blurb shown in the picker and Silk Pod.

Theme Mode

FieldTypeValues
theme_modestring"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").

FieldWhat it colors
background_gradient_startMain background gradient start
background_gradient_endMain background gradient end
card_gradient_startCard/panel gradient start
card_gradient_endCard/panel gradient end
text_primaryPrimary text
text_secondarySecondary/subtitle text
icon_tintIcon tint color
tile_backgroundGrid tile background fill
tile_borderGrid tile border
toggle_off_gradient_startToggle (off state) gradient start
toggle_off_gradient_endToggle (off state) gradient end
toggle_thumb_gradient_startToggle thumb gradient start
toggle_thumb_gradient_endToggle thumb gradient end
drop_shadowDrop shadow color
inner_shadow_lightInner shadow highlight
inner_shadow_darkInner shadow dark
successSuccess state color
warningWarning state color
dividerDivider/separator lines
accent_gradient_startAccent gradient start
accent_gradient_endAccent gradient end
accent_glowAccent 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

FieldTypeDescription
wallpaperstringRelative path to the main (top screen) wallpaper.
wallpaper_externalstringRelative 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.

FieldTypeRangeDefaultDescription
iconRoundnessfloat0–0.5Corner roundness of game icons. 0 = square, 0.5 = fully rounded.
iconScalefloat0.5–1.0Size of game icons on the grid.
hoverScalefloat0.5–1.0Growth factor when a game icon is selected/hovered.
heroDisplayStylestring"VIGNETTE", "FULLSCREEN", or "NONE". Controls how the hero image displays on the top screen.
heroLogoScalefloat0.1–1.0Size of the game logo on the top screen hero.
heroFolderLogoScalefloat0.1–1.0Size of the folder logo on the top screen hero.
heroGradientStylestring"NONE" or "BLACK_GRADIENT". Overlay gradient on the hero area.

Example:

"settings": {
  "iconRoundness": 0.15,
  "iconScale": 0.9,
  "heroDisplayStyle": "FULLSCREEN",
  "heroGradientStyle": "BLACK_GRADIENT"
}

Volume

FieldTypeDescription
volume.sfxfloatSound effects volume (0.0–1.0).
volume.musicfloatBackground 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"
  }
]
FieldTypeDescription
idstringUnique identifier for the asset pack.
namestringDisplay name.
categorystring"icon_overlays", "smart_folders", "sounds", or "music".
versionstringVersion 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.

FilenameWhen it plays
navigateCursor movement / D-pad navigation
selectConfirming a selection (A button)
backGoing back (B button)
folder_openOpening a smart folder
folder_closeClosing a smart folder
launchLaunching a game
errorError or invalid action
notificationToast / notification popup
discord_openOpening Discord Rich Presence overlay
discord_closeClosing Discord Rich Presence overlay
screen_swapSwapping top and bottom screens
grid_zoom_inZooming in on the game grid
grid_zoom_outZooming out on the game grid
reorder_pickupPicking up a tile during reorder
reorder_placePlacing a tile during reorder
open_editEntering edit mode
popPop / bubble effect
slider_increaseIncreasing a slider value
slider_decreaseDecreasing a slider value
savingSave operation started
saving_endSave operation completed
retroachievementsRetroAchievements 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.