For those interested in how the background color is computed, here is the 
algorithm:

1. Parse the Leo theme's style sheet and extract the body text foreground 
and background colors.
2. If the theme has a light background, use a slightly darker color; if the 
theme bg is dark, use a slightly lighter color.  Keep the hue the same, 
only changing the intensity (change only V in the HSV triple).  If the bg 
color is not specified, guess based on the fg color (currently this is a 
very simple minded guess)..
3. If the theme's bg color is very dark, use a larger change in intensity 
than otherwise (because the minimum perceptible change seems to be larger 
in the V value for very dark colors).

Please let us know how the highlighting works for you!

On Wednesday, September 15, 2021 at 9:13:40 AM UTC-4 [email protected] 
wrote:

> Highlighting of the body line the cursor is now in the latest version of 
> the *devel* branch. Highlighting is turned off by default.  To turn it 
> on, add a setting to myLeoSettings.leo, or to an outline in which you want 
> to try it out.  The setting is:
>
> @bool highlight-body-line = True
>
> By default, the highlight color will be computed based on the background 
> color of your theme.  If you do not like the computed color, you can 
> override it with another setting:
>
> @string line-highlight-color = yourcolor
>
> Instead of *yourcolor*,  use the CSS color you want.  Valid css colors 
> are standard css color names like *aliceblue*, *lightgrey*, etc. You can 
> also use css rgb color values like *#1253da*. If the color is not a valid 
> css color, black will be used, which is not likely to be a good highlight 
> color. (Note that the allowed color names are those known to Qt, and may 
> not include the full range used by browsers).
>
> The *Help/Open Help topics* menu has a new entry 
> *Help-For-Highlight-Current-Line*  that displays this information about 
> the color settings.
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/2ca2c0fc-11a3-4989-8ccb-72970969a5b1n%40googlegroups.com.

Reply via email to