Skip to content

docs(rfd): Add RFD D47 frontend-neutral styling and color adaptation#742

Merged
JeanMertz merged 2 commits into
mainfrom
prr291
Jun 4, 2026
Merged

docs(rfd): Add RFD D47 frontend-neutral styling and color adaptation#742
JeanMertz merged 2 commits into
mainfrom
prr291

Conversation

@JeanMertz
Copy link
Copy Markdown
Collaborator

Introduces a new draft RFD covering the design for a frontend-neutral style model and terminal-specific color adapter for the CLI.

The RFD addresses two user-visible failures: inline code rendering as black text on near-black backgrounds on light terminals, and incorrect syntax-highlighted output on 256-color terminals due to unconditional truecolor emission.

The proposed design separates three concerns into distinct layers: a shared semantic style vocabulary in a new jp_style crate, per-frontend renderers that resolve semantic scopes while context is still available, and a terminal sink in jp_printer that adapts ANSI bytes to the active terminal profile. This ensures truecolor downgrading and light/dark readability are handled in one place rather than repeated at every call site.

The RFD also defines a ColorProfile model in jp_term, environment and config precedence rules for color enablement and depth, and a phased implementation plan covering terminal profile detection, inline code readability, the shared style model, and CLI chrome scopes.

JeanMertz added 2 commits June 3, 2026 17:26
Introduces a new draft RFD covering the design for a frontend-neutral
style model and terminal-specific color adapter for the CLI.

The RFD addresses two user-visible failures: inline code rendering as
black text on near-black backgrounds on light terminals, and incorrect
syntax-highlighted output on 256-color terminals due to unconditional
truecolor emission.

The proposed design separates three concerns into distinct layers: a
shared semantic style vocabulary in a new `jp_style` crate, per-frontend
renderers that resolve semantic scopes while context is still available,
and a terminal sink in `jp_printer` that adapts ANSI bytes to the active
terminal profile. This ensures truecolor downgrading and light/dark
readability are handled in one place rather than repeated at every call
site.

The RFD also defines a `ColorProfile` model in `jp_term`, environment
and config precedence rules for color enablement and depth, and a
phased implementation plan covering terminal profile detection, inline
code readability, the shared style model, and CLI chrome scopes.

Signed-off-by: Jean Mertz <git@jeanmertz.com>
…tation

Signed-off-by: Jean Mertz <git@jeanmertz.com>
@JeanMertz JeanMertz merged commit e263033 into main Jun 4, 2026
15 checks passed
@JeanMertz JeanMertz deleted the prr291 branch June 4, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant