Skip to content

Try to enable 24-bit RGB colors by default#11372

Closed
krobelus wants to merge 2 commits into
fish-shell:masterfrom
krobelus:enable-rgb-colors-by-default
Closed

Try to enable 24-bit RGB colors by default#11372
krobelus wants to merge 2 commits into
fish-shell:masterfrom
krobelus:enable-rgb-colors-by-default

Conversation

@krobelus
Copy link
Copy Markdown
Contributor

@krobelus krobelus commented Apr 11, 2025

COLORTERM=truecolor doesn't work in some cases; I think we may want to
either default to assuming truecolor is supported, or use this recommended
fix
.

See the discussion around
#11345 (comment)

TODO: docs

  • fish_term24bit
  • doc_src/cmds/set_color.rst
  • doc_src/terminal-compatibility.rst

@faho
Copy link
Copy Markdown
Member

faho commented Apr 11, 2025

So this does querying, which I think is overkill for this and I'm not a fan of.

I think we can just assume no COLORTERM is a misconfiguration (or ssh's mistake) and assume RGB-color is supported.

@krobelus krobelus force-pushed the enable-rgb-colors-by-default branch from 59b7510 to b0cf678 Compare April 11, 2025 18:35
@krobelus krobelus force-pushed the enable-rgb-colors-by-default branch from b0cf678 to d8576b9 Compare April 11, 2025 18:37
Comment thread src/env_dispatch.rs
"disabled"
}
);
} else if vars.get(L!("STY")).is_some() || term.starts_with(L!("eterm")) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen won't unset $COLORTERM, so STY should stay.

I think `set_color ff0000` should default to outputting true-color sequences.
Unfortunately there is no good and widely-supported way to query for true-color
support.  `COLORTERM=truecolor` doesn't work in some cases such as ssh.

Since many terminals nowadays implement the RGB sequences, let's try using
them by default.

Note that Emacs's ansi-term implements truecolor now.

See also the discussion around
fish-shell#11345 (comment)
@krobelus krobelus force-pushed the enable-rgb-colors-by-default branch from d8576b9 to c8aa313 Compare April 11, 2025 19:27
@krobelus krobelus closed this in 6fcb418 Apr 11, 2025
@krobelus krobelus added this to the fish 4.1 milestone Apr 11, 2025
@faho faho mentioned this pull request Apr 16, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants