-
Notifications
You must be signed in to change notification settings - Fork 1
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
random colours for stream sometimes not readable #4
Comments
wouldnt it be more convenient to just set a default color that is generated (or maybe a few depending on proper usecase) instead of a random color which has a much higher chance of not being readable |
Hi @petryeric, having predefined colours could be a smart idea. Unfortunately, we cannot have just one colour as each stream should have a unique colour. What we would need to ensure however, is that we don't really know how many streams are going to connect so we would need N predefined colours sets with background and foreground. Sure we could do say 32 sets of colours as that feels enough - That was the reason I choose to use random colours. Maybe we could also define a range of say R G B ranges which we know will not cause colour issues and based on these ranges generate a random colour. Alternatively I though that as long as the function to determine whether to use Also what we would need to ensure is that a predefined colour is not used twice which however shouldn't be any issue. What are your thought on predefined colours taking in account that we can have N streams each having a unique colour? Happy to hear some ideas/feedback 😄 |
While browsing through lipgloss I found this which could be very interesting. Didn't tested it yet but would solve one issue where colors in the config could be chosen in accordance to the tty background - what we need to test if the color can also be chosen based on the background of a text.. This would solve quite a lot. |
each new stream connecting to scotty gets assigned a random tag color. However from time to time the color is not visible (either to light or to dark). Also the color is used as the tag background and the foreground color for the stream prefix of a log.
On a side node there is a function called
InvertColor
which should decide whether to use#ffffff
or#000000
as a foreground color for the tag text. However it does not seem to work properly.Goal would be that the random color is always a readable color + the chosen tag foreground color is well readable in respect to its background color.
The text was updated successfully, but these errors were encountered: