Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colors in Color Schems appear wrong. #3326

Open
manngo opened this issue May 30, 2024 · 2 comments
Open

Colors in Color Schems appear wrong. #3326

manngo opened this issue May 30, 2024 · 2 comments

Comments

@manngo
Copy link

manngo commented May 30, 2024

Description of the problem or steps to reproduce

I’m trying to concoct my own color scheme. I’m basing it on the Simple theme. I’m new to Micro, so maybe I’m misunderstanding something.

If I use the color “white”, either by name or by hex code (#ffffff), it appears as grey. Yellow comes out more like olive. Etc.

It appears that the colours are much darker than expected.

I have attached an image:

image

Specifications

Commit hash: 68d88b5
OS: Rocky Linux 9
Terminal: iTerm2 on macOS

@Andriamanitra
Copy link
Contributor

This is likely an issue with your terminal and/or how it is configured. If your terminal is only using 16 or 256 colors (which is often the default behavior unless the COLORTERM environment variable is set to "truecolor" even in terminals that support true color) it will just pick the "closest" one to the color you wanted.

You can find more information about how colors work in terminals and how to check if your terminal supports true color: https://github.com/termstandard/colors

@manngo
Copy link
Author

manngo commented Jun 5, 2024

OK, I think I have worked this out. It turns out that there were two issues.

First, there is the question of colour names. Apparently, white doesn’t mean “white”. It means grey. The same goes for the other colours. Using the “bright” version of the colour names is usually closer to the true meaning of the colour, but not always. I have managed to adjust my terminal settings, but I’m aware that the ANSI standard doesn’t match my expectation. More on this here:

https://en.wikipedia.org/wiki/ANSI_escape_code#Colors

The alternative is to work purely in hex values. To make this more reliable, we need to tell Micro that we’re using true colour. I’ve add this in my .bashrc file:

export COLORTERM=truecolor
export MICRO_TRUECOLOR=1

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

No branches or pull requests

2 participants