[PR #5009] fix: handle 0 in ANSI theme color definitions #11203

Closed
opened 2026-02-16 18:16:00 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/5009

State: closed
Merged: Yes


The theme handling code currently breaks when a color definition uses the ANSI value 0, like:

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

This PR updates the color definition lookup code to handle 0, which it currently treats as falsey.

Fixes #5010

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5009 **State:** closed **Merged:** Yes --- The theme handling code currently breaks when a color definition uses the ANSI value `0`, like: ```json { "defs": { "black": 0 }, "theme": { "text": "black" } } ``` This PR updates the color definition lookup code to handle 0, which it currently treats as falsey. Fixes #5010
yindo added the pull-request label 2026-02-16 18:16:00 -05:00
yindo closed this issue 2026-02-16 18:16:00 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11203