Review Request 123809: Use list of hard coded colors instead of generating it

David Nolden david.nolden.kde at art-master.de
Mon May 25 16:51:05 UTC 2015



> On May 25, 2015, 4:46 p.m., David Nolden wrote:
> > Some of these colors on the screenshots are far too bright, they don't have enough contrast to the background.
> > 
> > In general, I think this is going into the wrong direction. By increasing the number of colors, you automatically decrease their distinguishability.
> > 
> > The good thing is that you don't need to distinguish names by color which you can easily distuish by their shape.
> > 
> > Thus, a much better approach would be to select a small set of very well distinguishable colors, like before, and re-using the colors, but making sure that you only use the same color for names which have very different shapes.
> > 
> > e.g.: foo1, foo2, foo3, etc., should have very distinguishable colors, because they differ just in a single character.
> > 
> > But for example foo1, i, xx, iA, tempString, don't need distinguishable colors, because you can easily distinguish them by shape without even focussing them.
> > 
> > It would need a powerful shape similarity model, which would consider the length of names, their levenshtein distance, camel-casing structure, and maybe even the shape of characters for single-character names, but it would be a real step forward.

Actually, this would also work with a larger number of colors, by combining a shape similarity model and a color similarity model.


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123809/#review80815
-----------------------------------------------------------


On May 19, 2015, 6:06 p.m., Sergey Kalinichev wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123809/
> -----------------------------------------------------------
> 
> (Updated May 19, 2015, 6:06 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdevplatform
> 
> 
> Description
> -------
> 
> This fixes 2 issues:
> 
> *Currently rainbow highlighting only works for the first 10 declarations in Function and Other contexts. All other declarations get highlighted with the default color.
> *The current interpolation algorithm is very poor, it can generate only about 10 different colors, all other look alike.
>     
> So this patch adds ~35 distinguishable colors, which should be more than enough for most cases.
> 
> 
> Diffs
> -----
> 
>   language/highlighting/codehighlighting.cpp 59a7ffc 
>   language/highlighting/colorcache.h d04dfc5 
>   language/highlighting/colorcache.cpp e2729f2 
> 
> Diff: https://git.reviewboard.kde.org/r/123809/diff/
> 
> 
> Testing
> -------
> 
> 
> File Attachments
> ----------------
> 
> primary_colors.png
>   https://git.reviewboard.kde.org/media/uploaded/files/2015/05/17/4b5c74df-4f42-4a0d-8384-e82bd2b1214f__primary_colors.png
> all_colors.png
>   https://git.reviewboard.kde.org/media/uploaded/files/2015/05/17/6f700794-b2d1-4a48-97d4-3e354f3e7701__all_colors.png
> 
> 
> Thanks,
> 
> Sergey Kalinichev
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150525/bf355ac6/attachment.html>


More information about the KDevelop-devel mailing list