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

New feature ‘Adjust lightness of indistinguishable text’ - how it works? #658

Open
foal opened this issue Apr 29, 2016 · 8 comments
Open
Labels
Projects

Comments

@foal
Copy link
Sponsor

foal commented Apr 29, 2016

How does the new feature work? For example I have the following color combination for total size of selected files (see screenshot). It is completely unreadable and I do not see any different while this option is turned on.

ConEmu build: 160428 x64

image

@Maximus5
Copy link
Owner

Maximus5 commented Apr 29, 2016

You may easily check the effect of the option yourself by running

ConEmu.exe -basic -run {Show ANSI Colors}

and playing with checkbox.

2016-04-30_02-18-00

As for your screenshot - the distance between colors make them distinguishable for human eyes.

@foal
Copy link
Sponsor Author

foal commented Apr 30, 2016

As for your screenshot - the distance between colors make them distinguishable for human eyes.

Exactly! I hoped that you use some of a delta-E formula to implement it.
As evaluation I suggest to add a selector for different delta-E formulas and allows to setup a custom threshold,

@Maximus5
Copy link
Owner

The current implementation uses latest available DeltaE (2000). So I don't think you exact color combination, which you dislike, can be processed by feature. If ConEmu uses larger threshold - entire palette would be affected, which it's not suitable.

@foal
Copy link
Sponsor Author

foal commented Apr 30, 2016

Yes, you are right, the color distance in my example is too big to handle it by threshold parameter.

@foal
Copy link
Sponsor Author

foal commented Apr 30, 2016

I find out another parameter that influence on the text representation. Perhaps it will interest you.

It is contrast ration. In my example it is much bellow under recommended level 1.3 vs 4.5.

There is you can see it: http://leaverou.github.io/contrast-ratio/#rgb%28181%2C137%2C0%29-on-rgb%2849%2C130%2C164%29

More information:
https://www.w3.org/TR/WCAG/#visual-audio-contrast

I do not know how to exactly correct such things, but the first idea is dynamically shift the text color to increase the contract value.

e.g. (my case)
bg: rgb(49,130,164), text: rgb(181,137,0), contrast-ratio is 1.3
text
rgb(181,137,0) -> hsl(45,100%,35%),
shift the h to reach the maximum contrast-ratio for the current bg,
hsl(63,100%,35%) -> rgb(170,179,0)
result
bg: rgb(49,130,164), text: rgb(170,179,0), contrast-ratio is 1.9 (not a good, but much more better)

http://leaverou.github.io/contrast-ratio/#rgb%28170%2C179%2C0%29-on-rgb%2849%2C130%2C164%29

@foal
Copy link
Sponsor Author

foal commented May 16, 2016

Hi, How about new feature "Adjust contrast of indistinguishable text"? :)

@m0n
Copy link

m0n commented Nov 18, 2016

I do not open a new issue because my notes maybe too minor:

I spent a hour to figure out why my white text turned to gray when I downloaded a fresh version which introduced this feature months ago...

I using a semi-light-gray texture background which replaces a light-gray color (#DDDDDD). After this feature appeared white text turned gray. I'm unsure in that this option must to be enabled by default. At least this fooled me when I updated my ConEmu months after this feature introduced.

Proposal 2: let add a checkbox "Use this feature on bitmap backgrounds", unchecked by default. You force this feature by default but since bitmap hides background color this could leads problems (see above)

Proposal 3: on bitmap-backgrounds calculate an average background color for each character (of course You need to do this only when a new background image used then cache it).

Proposal 4: cast a contrast-shadow around characters - that would be make ANY text readable on ANY background 👍 ( I know the technical difficulties 😃 )

OFF-TOPIC: congrats for (the long-time-not-seen) stable releases! 😃

@Maximus5 Maximus5 added this to To Do in Drawing via automation Jul 23, 2018
@Maximus5
Copy link
Owner

And note about bad experience in the zsh prompt, there should be no contrast triangle...

2018-07-23_17-07-41

Normal image, but text is unreadable

2018-07-23_17-06-58

The text: zsh-prompt.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Drawing
  
To Do
Development

No branches or pull requests

3 participants