Skip to content

Conversation

@ultravail
Copy link

@ultravail ultravail commented Sep 20, 2019

There are 2 changes included:

a) The function getOppositeColor in color_compliment.py did not work properly. It was mixing value ranges from 0-1 and ranges from 0-255.

b) When hostname colorization is enabled, then a random number is being generated for the foreground color of the hostname and the opposite color is being calculated for the background color.

However, when running in a shell with dark background color it typically looks better if the background color of the hostname is "bright". So I introduced a noption in the configuration named "hostname.dark" that (when set to true) picks the brighter of the two colors for the hostname as the background color (by swapping the two if the foreground color is the brighter one in the first place).

The function getOppositeColor in color_compliment.py
did not work properly. It was mixing value ranges
from 0-1 and ranges from 0-255
When hostname colorization is enabled, then a
random number is being generated for the foreground
color of the hostname and the opposite color is
being calculated for the background color.

When running in a shell with dark background color
it typically looks better if the background color
of the hostname is "bright". So I introduced an
option in the configuration named "hostname.dark"
that (when set to true) picks the brighter of the
two colors for the hostname as the background color.
@Nicholas-Autio-Mitchell

This would be great to have... I keep getting unreadable hostnames, making this functionality useless.

@b-ryan (or other maintainers) - any reason this isn't being merged?

@CWempe
Copy link

CWempe commented Jan 10, 2020

I have the same issue with unreadable hostnames.
But I am not sure if this PR solves this.

You might take a look at this issue. #381

The initial fix unnecessarily divided RGB values by 255
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

Successfully merging this pull request may close these issues.

3 participants