Skip to content

ANSI themes with 0 in color definitions don't work #5010

@jason0x43

Description

@jason0x43

Description

If a theme uses 0 in a definition, opencode crashes.

{
  "defs": {
    "black": 0
  },
  "theme": {
    "text": "black"
  }
}

OpenCode version

1.0.128

Steps to reproduce

  1. Create a theme using 0 for a color definition
  2. Use the defined color in the theme
  3. Select the theme in opencode

Screenshot and/or share link

No response

Operating System

macOS 26.1

Terminal

kitty

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions