<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/123809/">https://git.reviewboard.kde.org/r/123809/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On May 25th, 2015, 4:46 p.m. UTC, <b>David Nolden</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Some of these colors on the screenshots are far too bright, they don't have enough contrast to the background.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">In general, I think this is going into the wrong direction. By increasing the number of colors, you automatically decrease their distinguishability.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">The good thing is that you don't need to distinguish names by color which you can easily distuish by their shape.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">e.g.: foo1, foo2, foo3, etc., should have very distinguishable colors, because they differ just in a single character.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p></pre>
 </blockquote>




 <p>On May 25th, 2015, 4:51 p.m. UTC, <b>David Nolden</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Actually, this would also work with a larger number of colors, by combining a shape similarity model and a color similarity model.</p></pre>
 </blockquote>





 <p>On May 27th, 2015, 8:36 a.m. UTC, <b>Sergey Kalinichev</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Some of these colors on the screenshots are far too bright, they don't have enough contrast to the background.</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I've been using this patch for more then a week - works nicely for me. If you think that it's too bright, try to decrease the local color intensity.</p>
<blockquote style="text-rendering: inherit;padding: 0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 0.5em;line-height: inherit;">
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">By increasing the number of colors, you automatically decrease their distinguishability.</p>
</blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">That's true. Still it's much, much better than what we had before: first ten declarations highlighted with like 5 colors, everything else is grey. Also note that at first only 10 truly distinguishable colors are used and when they run out - all other.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Generally I think this shape similarity model is a good idea. Nevertheless I find that what have now is much better than what we had before, so I'm not really planning to work on further improvements by taking shapes into consideration (at least not in the foreseeable future). So, feel free to implement it yourself.</p></pre>
 </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Yes, I guess it's an improvement anyway. Let's see, maybe I'll implement the similarity model some time, in case I find that colors tend to be too similar in practice.</p></pre>
<br />










<p>- David</p>


<br />
<p>On May 19th, 2015, 6:06 p.m. UTC, Sergey Kalinichev wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for KDevelop.</div>
<div>By Sergey Kalinichev.</div>


<p style="color: grey;"><i>Updated May 19, 2015, 6:06 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kdevplatform
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">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.</pre>
  </td>
 </tr>
</table>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>language/highlighting/codehighlighting.cpp <span style="color: grey">(59a7ffc)</span></li>

 <li>language/highlighting/colorcache.h <span style="color: grey">(d04dfc5)</span></li>

 <li>language/highlighting/colorcache.cpp <span style="color: grey">(e2729f2)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/123809/diff/" style="margin-left: 3em;">View Diff</a></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments </h1>


 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/05/17/4b5c74df-4f42-4a0d-8384-e82bd2b1214f__primary_colors.png">primary_colors.png</a></li>

 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2015/05/17/6f700794-b2d1-4a48-97d4-3e354f3e7701__all_colors.png">all_colors.png</a></li>

</ul>




  </td>
 </tr>
</table>







  </div>
 </body>
</html>