Skip to content

opentui: fatal: undefined is not an object (evaluating 'c3[mode2]') #4237

Closed

Description

@Rabeez

Description

This is triggered when switching to a custom theme with "darkBase": "none". I've verified that the exact same custom theme json file with a normal rgb hex color works.

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 runTop (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:833:7)
    at runQueue (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:904:42)
    at completeUpdates (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:860:84)
    at runUpdates (../../node_modules/.bun/[email protected]/node_modules/solid-js/dist/dev.js:850:5)
    at setStore (../../node_modules/.bun/[email protected]/node_modules/solid-js/store/dist/dev.js:221:5)
    at set (src/cli/cmd/tui/context/theme.tsx:123:9)
    at onMove (src/cli/cmd/tui/component/dialog-theme-list.tsx:26:13)
    at moveTo (src/cli/cmd/tui/ui/dialog-select.tsx:64:11)
    at move (src/cli/cmd/tui/ui/dialog-select.tsx:60:5)
    at <anonymous> (src/cli/cmd/tui/ui/dialog-select.tsx:83:62)
    at emit (node:events:95:22)
    at emitWithPriority (../../node_modules/.bun/@[email protected]+81ecd8642a1892ca/node_modules/@opentui/core/index-kj9k00yt.js:2353:38)
    at processInput (../../node_modules/.bun/@[email protected]+81ecd8642a1892ca/node_modules/@opentui/core/index-kj9k00yt.js:2315:14)
    at <anonymous> (../../node_modules/.bun/@[email protected]+81ecd8642a1892ca/node_modules/@opentui/core/index-kj9k00yt.js:13525:13)
    at emit (node:events:95:22)
    at process (../../node_modules/.bun/@[email protected]+81ecd8642a1892ca/node_modules/@opentui/core/index-kj9k00yt.js:4617:12)
    at <anonymous> (../../node_modules/.bun/@[email protected]+81ecd8642a1892ca/node_modules/@opentui/core/index-kj9k00yt.js:13467:23)
    at emit (node:events:95:22)
    at addChunk (internal:streams/readable:264:47)
    at readableAddChunkPushByteMode (internal:streams/readable:242:18)
    at internalRead (native:38:40)
    at processTicksAndRejections (native:7:39)...

OpenCode version

1.0.61

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 12, 2025
  2. github-actions commented on Nov 12, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Both issues appear to be triggering the same underlying bug in the theme resolution code when using custom theme configurations.

    Feel free to ignore if none of these address your specific case.

  3. kommander commented on Nov 12, 2025

    @kommander
    Contributor

    Ansi colors are not supported.

  4. Sawangg commented on Nov 12, 2025

    @Sawangg

    @kommander is there plan to add back support for the "none" keyword? The transparency of my terminal is not being respected by the system theme and I was hoping the "none" keyword with a custom theme would do the trick

  5. kommander commented on Nov 12, 2025

    @kommander
    Contributor

    Opentui supports the "transparent" keyword. Not sure how that is mapped currently, but should work. If not, that we can and should fix.

  6. Sawangg commented on Nov 12, 2025

    @Sawangg

    The transparent keyword throws the same error sadly

    TypeError: undefined is not an object (evaluating 'c3[mode2]')
    

    I don't know if another issue should be created to support both none/transparent

  7. kommander commented on Nov 12, 2025

    @kommander
    Contributor

    Okay I think I am misunderstanding something here, I all look into it.

  8. marked Theme error #4304 as a duplicate of this issue on Nov 13, 2025
  9. self-assigned this
    on Nov 13, 2025
  10. rekram1-node commented on Nov 16, 2025

    @rekram1-node
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

opentuiThis 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