Skip to content

馃挕 let a colordepth "16" event switch a live term to 16 colors聽#153

Open

Description

@dreyfus92

Is your feature request related to a problem?

on #148, a colordepth capability event only folds into trueColor (color-encoding-spec 搂6.1: "no other fold changes the tier"). so colordepth: "256" works at runtime, but colordepth: "16" just turns truecolor off and leaves colors alone, and the term keeps emitting 256-color SGR. the only way to get real 16-color output is to create a new term

repro (pinned to #148's preview build): https://stackblitz.com/edit/stackblitz-starters-9nffjdmq?file=index.js

it renders red text, then folds colordepth events into the same term:

  • start (truecolor): 38;2;255;0;0
  • after colordepth: "256": 38;5;1
  • after colordepth: "16": 38;5;1, still 256
  • a new term created with colors: 16: 31

Describe the solution you'd like

let colordepth: "16" fold into colors too, so the event value is the tier you get. it's still capability evidence going through update(), so it fits TINV-3 without adding a separate color mode option

Describe alternatives you've considered

rebuilding the term on a tier change, which is what my command palette demo does. it works, but the caller has to carry the theme, sync-output and pointer-shape state over by hand and restore the pointer shape first. i got that wrong the first time and pointer shapes stopped working after any tier switch, so it's easy to trip on

Additional context

related to #60 and #148. the compositing demo on feat/compositing-core has the same issue: its 3 key folds colordepth: "16", and after pressing it the demo only emits 256-color SGR (no 16-color codes)

AI assistance disclosure

  • This feature request was drafted with the assistance of an AI tool.

Activity

  1. changed the title [-]let a colordepth "16" event switch a live term to 16 colors[/-] [+]馃挕 let a colordepth "16" event switch a live term to 16 colors[/+] on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions