opencode
opencode copied to clipboard
Can't use custom themes that use ANSI colors
Description
Trying to load a theme that uses ANSI colors causes opencode to error.
TypeError: undefined is not an object (evaluating 'c3[mode2]')
at resolveColor (src/cli/cmd/tui/context/theme.tsx:64:25)
at <anonymous> (src/cli/cmd/tui/context/theme.tsx:67:18)
at map (native:1:11)
at resolveTheme (src/cli/cmd/tui/context/theme.tsx:66:57)
at runComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:742:22)
at updateComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:724:3)
at readSignal (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:660:67)
at get (src/cli/cmd/tui/context/theme.tsx:106:18)
at <anonymous> (src/cli/cmd/tui/app.tsx:531:17)
at runComputation (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:742:22)...
OpenCode version
1.0.61
Steps to reproduce
- Create a custom theme using the my-theme.json example
- Change one of the color definitions to be a palette number, like
"nord9": 9,. - Set the custom theme as the default in the opencode config
- Start opencode and see error
Screenshot and/or share link
No response
Operating System
macOS 26.1
Terminal
kitty