Enable truecolor support for Windows Terminal

This commit is contained in:
badlogic 2025-12-02 13:03:48 +01:00
parent 15428f10ed
commit e2e2cf116c
2 changed files with 5 additions and 0 deletions

View file

@ -135,6 +135,10 @@ function detectColorMode(): ColorMode {
if (colorterm === "truecolor" || colorterm === "24bit") {
return "truecolor";
}
// Windows Terminal supports truecolor
if (process.env.WT_SESSION) {
return "truecolor";
}
const term = process.env.TERM || "";
if (term.includes("256color")) {
return "256color";