o2sh / onefetch

Command-line Git information tool

Home Page:https://onefetch.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

True color support not recognized on Windows Terminal

lomirus opened this issue · comments

Duplicates

  • I have searched the existing issues

Current behavior 😯

In windows terminal:
QQ截图20231102192629

The dart is red, and the rust is green

Expected behavior 🤔

But in the VSCode terminal, it displays as expected:

QQ截图20231102192637

Steps to reproduce 🕹

Open windows terminal and run onefetch

Additional context/Screenshots 🔦

No response

Possible Solution 💡

Using VSCode terminal

The results you're seeing in the Windows terminal is most likely because that terminal instance doesn't support truecolor. Or, perhaps more accurately, our tools don't think your terminal supports truecolor. When the language bar can't display the exact color, we fall back to the simple colors. See #585 for context. So I see two possible solutions

  1. Get better at detecting if the terminal supports true color (bug fix, possibly upstream)
  2. Pick better colors when the terminal doesn't support true color (feature request) I think we've discussed this before, and decided that we need to cycle arbitrary colors to distinguish languages that would have the same simple color

As a current workaround, try onefetch --true-color always and let us know if it looks good 🙂

QQ截图20231103104514

Windows terminal supports true color. It seems to be a detecting problem.

You're correct @lomirus 👍

We're discussing the problem over here 👉 #1200

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

IMO this issue should remain open for now. Should it be pinned?