Properly porting Solarized to Kate/KDevelop -- need to change behavior of search result highlighting

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Properly porting Solarized to Kate/KDevelop -- need to change behavior of search result highlighting

Ivan Shapovalov
Hello,

I'm trying to make a proper port of Solarized[1] to Kate/KDevelop and
it looks like Solarized is incompatible with KTE's search result
highlighting behavior.

More specifically, any strong highlighting in Solarized is represented
with inverted colors. The text assumes background color, while the
background assumes one of the "accent" colors (or, in the simplest
case, the default foreground color)[2][3].

This is easy to achieve for text selection: each text style has a
separate "selected foreground" color which can be set to background
color[4]. However, search result highlighting in Kate only changes the
background color and leaves text color unmodified[5]. As a result,
highlighted text is completely illegible, because accent and foreground
colors in Solarized have equal lightness values.

As a proof-of-concept, I changed behavior of Kate/KDevelop to treat
search highlighting in the same way as selection, i. e. use the
"selected" foreground for highlighted search results[6]. However, this
(obviously) breaks existing color schemes.

It has been suggested on #kdevelop to implement a hidden per-schema or
per-syntax-highlighting flag that will change behavior as described
above. However, this will be greatly confusing for anybody who decides
to tweak their color scheme or invent a new one via GUI.

All in all, I don't know whether you will like any of these ideas or
the concept in general. Any suggestions? My end goal is to have a
proper port of Solarized in Kate/KDevelop.

[1]: http://ethanschoonover.com/solarized#usage-development

[2]: http://storage6.static.itmages.ru/i/17/0305/h_1488717000_1405370_329bf9ae4f.png
[3]: http://storage8.static.itmages.ru/i/17/0305/h_1488717099_1417541_fcb38b6d97.png

[4]: http://storage9.static.itmages.ru/i/17/0305/h_1488717178_3602274_9a3644a981.png
[5]: http://storage7.static.itmages.ru/i/17/0305/h_1488705847_1951698_118722209b.png
[6]: http://storage7.static.itmages.ru/i/17/0305/h_1488705847_4424970_75bdae703e.png

Thanks,

--
Ivan Shapovalov / intelfx /

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Properly porting Solarized to Kate/KDevelop -- need to change behavior of search result highlighting

Ivan Shapovalov
On 2017-03-05 at 15:47 +0300, Ivan Shapovalov wrote:

> Hello,
>
> I'm trying to make a proper port of Solarized[1] to Kate/KDevelop and
> it looks like Solarized is incompatible with KTE's search result
> highlighting behavior.
>
> More specifically, any strong highlighting in Solarized is
> represented
> with inverted colors. The text assumes background color, while the
> background assumes one of the "accent" colors (or, in the simplest
> case, the default foreground color)[2][3].
>
> This is easy to achieve for text selection: each text style has a
> separate "selected foreground" color which can be set to background
> color[4]. However, search result highlighting in Kate only changes
> the
> background color and leaves text color unmodified[5]. As a result,
> highlighted text is completely illegible, because accent and
> foreground
> colors in Solarized have equal lightness values.
>
> As a proof-of-concept, I changed behavior of Kate/KDevelop to treat
> search highlighting in the same way as selection, i. e. use the
> "selected" foreground for highlighted search results[6]. However,
> this
> (obviously) breaks existing color schemes.
>
> It has been suggested on #kdevelop to implement a hidden per-schema
> or
> per-syntax-highlighting flag that will change behavior as described
> above. However, this will be greatly confusing for anybody who
> decides
> to tweak their color scheme or invent a new one via GUI.
>
> All in all, I don't know whether you will like any of these ideas or
> the concept in general. Any suggestions? My end goal is to have a
> proper port of Solarized in Kate/KDevelop.
>
> [1]: http://ethanschoonover.com/solarized#usage-development
>
> [2]: http://storage6.static.itmages.ru/i/17/0305/h_1488717000_1405370
> _329bf9ae4f.png
> [3]: http://storage8.static.itmages.ru/i/17/0305/h_1488717099_1417541
> _fcb38b6d97.png
>
> [4]: http://storage9.static.itmages.ru/i/17/0305/h_1488717178_3602274
> _9a3644a981.png
> [5]: http://storage7.static.itmages.ru/i/17/0305/h_1488705847_1951698
> _118722209b.png
> [6]: http://storage7.static.itmages.ru/i/17/0305/h_1488705847_4424970
> _75bdae703e.png
>
> Thanks,
>
Anybody?

--
Ivan Shapovalov / intelfx /

signature.asc (849 bytes) Download Attachment