Cocoon Shell

Theme JSON Reference

Fields and folders used by Cocoon theme.json files.

Theme JSON Reference

Use this reference when building a theme by hand. The Theme Builder is easier for most authors and exports the same structure.

Folder Structure

Place each theme inside the themes/ folder of the Cocoon data directory:

themes/my-theme/
├── theme.json
├── preview.png
├── wallpapers/
│   ├── main.webp
│   └── external.mp4
├── sounds/
│   ├── navigate.ogg
│   └── ...
├── music/
│   └── ...
├── icon_overlays/
│   └── gba/
│       ├── mask.png
│       └── overlay.png
└── smart_folders/
    ├── favorites/
    │   ├── icon.png
    │   ├── hero.png
    │   └── logo.png
    └── by_platform/gba/
        ├── icon.png
        ├── hero.png
        └── logo.png

Use lowercase folder names for consistency.

Example File

Every field except name is optional. Omitted colors and settings leave the user’s current values unchanged.

{
  "name": "My Theme",
  "author": "Your Name",
  "version": "1.0.0",
  "description": "Short description",
  "credits": "Optional asset credits",
  "website": "https://example.com",
  "theme_mode": "DARK",
  "wallpaper_main": "main",
  "wallpaper_external": "external",
  "color_scheme": {},
  "settings": {},
  "music_mode": "PLAYLIST",
  "music_playlist": "music/one.mp3||music/two.mp3",
  "music_playback_mode": "SHUFFLE",
  "sfx_volume": 0.8,
  "music_volume": 0.5,
  "jingle_volume": 0.7,
  "asset_refs": []
}

Metadata and Theme Mode

FieldTypeNotes
namestringRequired display name
authorstringAuthor or handle
versionstringTheme version
descriptionstringShort store/picker description
creditsstringAsset and collaborator credits
websitestringOptional project URL
theme_modestringLIGHT or DARK. OLED and SYSTEM are also valid

Enum values are case-insensitive.

Colors

Put colors in color_scheme. Use #RRGGBB or #AARRGGBB.

FieldPurpose
background_gradient_start, background_gradient_endMain background gradient
card_gradient_start, card_gradient_endCards and dialogs, plus panels
text_primary, text_secondaryMain and supporting text
icon_tintDefault flat icon tint
tile_background, tile_borderGame and app tiles
toggle_off_gradient_start, toggle_off_gradient_endToggle off track
toggle_thumb_gradient_start, toggle_thumb_gradient_endToggle thumb
drop_shadow, inner_shadow_light, inner_shadow_darkDepth effects
success, warning, dividerSemantic and divider colors
accent_gradient_start, accent_gradient_end, accent_glowAccent override
selection_gradient_start, selection_gradient_endOptional cursor-only gradient

When selection colors are omitted, the cursor follows the effective accent. If only one endpoint is supplied, the other falls back to its accent endpoint.

Wallpapers

FieldDescription
wallpaper_mainMain/bottom display wallpaper name or relative reference
wallpaper_externalExternal/top display wallpaper name or relative reference

Wallpaper files normally live under wallpapers/. References may omit the extension. Cocoon checks image and GIF formats, plus video. Without explicit fields, it checks names such as main or bottom. The names external and top also work.

Display and Behavior Settings

Put these snake-case fields inside settings. They apply once when the user chooses to apply Theme Settings and remain editable afterward.

FieldType / valuesPurpose
icon_roundness0.0-0.5Tile corner roundness
icon_scale0.5-1.0Artwork size inside tiles
hover_scale0.5-1.0Non-selected/selected scale relationship
hero_display_styleVIGNETTE, FULLSCREEN, NONEHero image treatment
hero_logo_scale0.1-1.0Game logo size
hero_folder_logo_scale0.1-1.0Folder logo size
hero_gradient_styleNONE, BLACK_GRADIENTHero overlay
hero_vignette_size0.3-1.0Vignette area
icon_styleCOLORED, ACCENT, FLATCocoon icon rendering
surface_materialSOLID, GLASSPanel material
glass_blur0.0-10.0Glass blur
glass_refraction0.0-1.0Refraction strength
glass_highlightbooleanBright glass rim
glass_rim_strength0.0-1.0Rim intensity
glass_on_tilesbooleanExtend Glass to tiles
glass_tint0.0-1.0Surface tint
cursor_styleANIMATED, OUTLINED, ALTERNATIVE_ANIMATED, ALTERNATIVEOutlined or corner cursor, animated or static
highlight_thickness0.5-1.0Selection border thickness
dock_icon_shapeCIRCLE, SQUIRCLE, ROUNDED_SQUARE, SQUAREDock app shape
hide_dock_backgroundbooleanHide the dock panel
dock_on_topbooleanPlace the dock at the top
corner_hintsbooleanAlways show button hints

Music and Volume

FieldValues / format
music_modeTIME, PLAYLIST or DISABLED
music_time_schedule`hour:minute|relative-file
music_playlistRelative files separated with `
music_playback_modeIN ORDER or SHUFFLE
sfx_volume, music_volume, jingle_volume0.0-1.0

Sound Files

Put sound files in sounds/ and use these base names:

The sound names are listed below:

navigate             select                back
folder_open          folder_close          launch
error                notification          discord_open
discord_close        screen_swap           grid_zoom_in
grid_zoom_out        reorder_pickup        reorder_place
open_edit            pop                   slider_increase
slider_decrease      saving                saving_end
retroachievements

WAV and MP3 files are supported. OGG and M4A also work, as does FLAC.

Icon Overlays

Use icon_overlays/{platform}/mask.png and/or overlay.png.

  • mask.png defines the visible game-art shape.
  • overlay.png is drawn above the game art.
  • The platform folder uses Cocoon’s platform ID, such as gba or snes.

See Icon Overlays for authoring advice.

Smart-Folder Assets

Use smart_folders/{type}/icon for the icon. The hero and logo names add the other images. Common keys include favorites and recent. Other keys are most_played, unplayed, newly_added, android_games and emulators.

Platform folders go under smart_folders/by_platform/{platform}/. Missing components fall back independently, so a pack can provide only icons or only heroes.

Asset References

Silk themes can depend on shared asset packs:

"asset_refs": [
  {
    "id": "pack-id",
    "name": "Pack Name",
    "category": "icon_overlays",
    "version": "1.0"
  }
]

Supported categories include icon_overlays and smart_folders. The sounds and music categories are also valid. Cocoon downloads missing linked packs when a theme comes from Silk.

Validation Tips

  • Keep theme.json valid JSON with no comments or trailing commas.
  • Test Light and Dark themes, plus OLED.
  • Check single-screen and dual-screen layouts.
  • Check text contrast and selection visibility.
  • Increment version when publishing an update.
  • Check that every file named in the theme exists.
On this page