[Geany-Devel] Mistake in utils_invert_color

Volodymyr Kononenko vmkononenko at xxxxx
Wed Oct 30 20:10:34 UTC 2013

Hi all!

While playing with colors for pairtaghighlighter plugin, I saw that
Scintilla is using BGR instead of normal RGB. I found existing code in
Geany source to use it in my plugin.

utils_invert_color from utils.c deals with replacing blue with red, but
with mistake.

Below are results of my testing with random color:
11111111 11001100 10011001 - input color
10011001 11001100 11111111 - result of my function (rgb2bgr)
00000000 00110011 01100110 - result of utils_invert_color

A little source file is attached.
If it is really mistake (maybe I don't know something), I will do commit
and pull request.

Any comments about this?

Best regards,
Volodymyr Kononenko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20131030/7b9b6d5a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rgb2bgr.c
Type: text/x-csrc
Size: 779 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20131030/7b9b6d5a/attachment.c>

More information about the Devel mailing list