You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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 RGB 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 #ffffff or #000000 would work properly it would already be good.
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?
Lastly, if a stream disconnects and reconnects it should get the same colour assigned (this is already build in the system, and should not be changed).
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: