<div dir="ltr">Ok. Now I've found an appropriate one - rotate_rgb.<br><span tabindex="-1" id="result_box" class="" lang="en"><span class="">False alarm</span></span>, thanks :)<br><div class="gmail_extra"><br><br><div class="gmail_quote">
On 30 October 2013 23:03, Colomban Wendling <span dir="ltr"><<a href="mailto:lists.ban@herbesfolles.org" target="_blank">lists.ban@herbesfolles.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Le 30/10/2013 21:10, Volodymyr Kononenko a écrit :<br>
<div>> While playing with colors for pairtaghighlighter plugin, I saw that<br>
> Scintilla is using BGR instead of normal RGB. I found existing code in<br>
> Geany source to use it in my plugin.<br>
><br>
> utils_invert_color from utils.c deals with replacing blue with red, but<br>
> with mistake.<br>
><br>
> Below are results of my testing with random color:<br>
> 11111111 11001100 10011001 - input color<br>
> 10011001 11001100 11111111 - result of my function (rgb2bgr)<br>
> 00000000 00110011 01100110 - result of utils_invert_color<br>
<br>
</div>utils_invert_color() *inverts* a color, it doesn't transform RGB to BGR<br>
or something.  It's used e.g. in the "invert syntax highlighting colors"<br>
feature.  It's basically the C "~" operator.  And if you expect this,<br>
you'll see it works just fine: 1 becomes 0 and 0 becomes 1.<br>
<br>
Not sure why we don't simply do ((~color) & 0xffffff), but that's just<br>
an implementation detail.<br>
</blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Volodymyr Kononenko<br><a href="http://kononenko.ws" target="_blank">http://kononenko.ws</a><br>
</div></div>