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

Sergey Kalinichev kalinichev.so.0 at gmail.com
Sun May 17 09:52:35 UTC 2015



> On May 16, 2015, 5:19 p.m., Andreas Pakulat wrote:
> > I don't think the set of colors chosen works very well. There are several that are hardly different enough to be differentiable for me, especially on a quick glance (foo6, foo3 in the second bunch, foo3 and foo5 in the third bunch look very much the same). And at least foo8 and foo10 seem to have the exact same color.
> > 
> > How did you choose the colors? I faintly recall from my university time that there are formulas and theories about how easy it is to differ between color shades. Maybe with a few less number of colors their individual difference can be increased so they don't look so much alike?

>How did you choose the colors?

I didn't mention, but the initial set of 50 colors was generated by using the CIEDE2000 formula. Then 15 colors were removed (black, white, gray, pink, some hues of green e.t.c). Also about 5-8 colors were made a bit brighter, that's how I got that list of colors.

>Maybe with a few less number of colors their individual difference can be increased so they don't look so much alike?

Yes it's possible to choose 10-12 truly distinguishable colors and use it, but then again only first 10-12 declarations will be highlighted which is rarely enough.
So I'm thinking maybe we should use 10-12 colors at first and only when they run out switch to the much bigger set of 20-30 colors (some of them'll look alike, but it shouldn't matter much and it's still much better then no highlighting at all). What do you think?


- Sergey


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


On May 16, 2015, 11:07 a.m., Sergey Kalinichev wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123809/
> -----------------------------------------------------------
> 
> (Updated May 16, 2015, 11:07 a.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/colorcache.cpp e2729f2 
> 
> Diff: https://git.reviewboard.kde.org/r/123809/diff/
> 
> 
> Testing
> -------
> 
> 
> File Attachments
> ----------------
> 
> Before
>   https://git.reviewboard.kde.org/media/uploaded/files/2015/05/16/2fb289f0-69d8-4817-bf0d-d1691c98d3c1__test_highl_b.png
> After
>   https://git.reviewboard.kde.org/media/uploaded/files/2015/05/16/7bcdb744-e47f-435b-a02e-d0ad35b4a59e__test_highl_a.png
> After (dark)
>   https://git.reviewboard.kde.org/media/uploaded/files/2015/05/16/b67be6b5-b4bf-4d74-8ed9-206e897daa14__test_highl_adark.png
> 
> 
> Thanks,
> 
> Sergey Kalinichev
> 
>

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


More information about the KDevelop-devel mailing list