Closed thisisparker closed 3 years ago
Suggest bright_black or color_rgb which will map to the nearest 16 or 256-color
@jquast ah, that's sort of what I feared. There's no way to specify a "less bright" version of the user's default color in an agnostic way, then? (e.g. bright_black is a great grey for a black-on-white terminal, but not as much for green-on-black, and it was nice to leave that selection up to the user for as long as I could.)
Or to the second point, is there any way in blessed
I could identify the user's current defaults? I could probably fudge a dim version of that myself, if I knew what it were...
I think I might have found a short-term solution: it appears I can use, e.g.,
echo(term.dim + "this is dim text" + term.normal)
# instead of
echo(term.dim("this is dim text"))
and it will continue to work for at least blessed 1.18.1. In the meantime, I'll have to build in better color stuff on my end!
Closing this issue because the above workaround made it into b0c1ec2bf07ec91975519b04c662582be37152df, although the real fix will be when I have custom color support and the dim
color is explicitly specified.
In a few places, cursewords uses term.dim() for sections that don't need consistent user focus... stuff like the title, and the lines of the grid. The result looks great, imo, and you can see it here and compare the regular brightness reversed message with the dimmed version:![image](https://user-images.githubusercontent.com/400348/131760934-30171985-9b7b-4d0f-999d-643b33ca3ac1.png)
I especially like it because, to date, I haven't added customizable color support... instead it just uses the colors of your terminal, and that dim-to-regular relationship is preserved even with different color palettes, without me having to force a particular scheme:![image](https://user-images.githubusercontent.com/400348/131761065-61017e48-5f3b-4339-9cf2-16008b15be54.png)
BUT in my long-overdue review of a @jquast PR I've learned term.dim() is not very widely supported, and its use has been partially deprecated in new version of
blessed
(which I want to use!). So I have two questions to explore: