Git Product home page Git Product logo

Comments (6)

romkatv avatar romkatv commented on August 16, 2024 1

I'll follow your advice and try to use the Lean style.

This is a very good idea.

In addition, you might want to disable the unhelpful behavior of VSCode Terminal: https://code.visualstudio.com/docs/terminal/appearance#_minimum-contrast-ratio

from powerlevel10k.

romkatv avatar romkatv commented on August 16, 2024 1

I've added to the docs a new troubleshooting section for this: https://github.com/romkatv/powerlevel10k?tab=readme-ov-file#incorrect-foreground-color-in-vscode-terminal

from powerlevel10k.

romkatv avatar romkatv commented on August 16, 2024

The only options I see here are user error and terminal bug.

from powerlevel10k.

Piero24 avatar Piero24 commented on August 16, 2024

Hi @romkatv, could you explain better what I did wrong?

from powerlevel10k.

romkatv avatar romkatv commented on August 16, 2024

I didn't mean to imply you did something wrong. Let me elaborate.

One option is that you did something different from what you think you did. That would be user error. For example, if you thought you'd changed POWERLEVEL9K_DIR_BACKGROUND but you've actually changed POWERLEVEL9K_DIR_FOREGROUND. I don't think is likely, but I wanted to list this possibility.

Another--more likely--option is that your terminal has a bug. You can verify it with the following command:

print -PC1 '%K{4}%F{255}white on blue%k%f' '%K{38}%F{255}white on teal%k%f'

The output should look like this:

image

The background on the first line may have a different color in your terminal, and that's normal. This is because colors with the numbers up to 16 are terminal-dependent. The background on the second line, and the foreground on both lines, must have exactly the same colors in all (non-buggy) terminals.

If you get grey foreground on the second line, your terminal is misbehaving. Some terminals have this unhelpful behavior on purpose with the intention of making things better. Some of those have an option in settings to turn this behavior off in their settings. It's usually called something like "minimum contrast". The ideal behind it is that the terminal will change colors if it believes that there isn't enough contrast between the foreground and the background color. I personally despise this option, for I prefer simple systems that do what I tell them to do.

You might find this FAQ helpful: https://github.com/romkatv/powerlevel10k?tab=readme-ov-file#directory-is-difficult-to-see-in-prompt-when-using-rainbow-style

My personal advice is to use Lean style. It looks better, saves horizontal space, and avoids many pitfalls around background colors.

from powerlevel10k.

Piero24 avatar Piero24 commented on August 16, 2024

Thanks for the clarification, @romkatv . You're right, the problem is due to the terminal. Specifically, the one integrated into VSCode. In fact, if I write what's suggested in the Apple Terminal and in the VSCode integrated Terminal, I get two different results.

Another--more likely--option is that your terminal has a bug. You can verify it with the following command:

print -PC1 '%K{4}%F{255}white on blue%k%f' '%K{38}%F{255}white on teal%k%f'

OUTPUT VSCODE:

Screenshot 2024-05-04 at 11 07 19

OUTPUT APPLE TERMINAL:

Screenshot 2024-05-04 at 11 07 06

You might find this FAQ helpful: https://github.com/romkatv/powerlevel10k?tab=readme-ov-file#directory-is-difficult-to-see-in-prompt-when-using-rainbow-style

My personal advice is to use Lean style. It looks better, saves horizontal space, and avoids many pitfalls around background colors.

I'll follow your advice and try to use the Lean style.

from powerlevel10k.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.