I have actually traced the source of the problem. It happens because Geany and the GtkColorSelection take the same underlying GdkColor (0..65535 resolution) and use different algorithms to convert it to #RRGGBB (0..255 resolution), resulting in a slight discrepancy between what’s shown in the dialog and what’s inserted into the document.

This can be fixed by switching the two lines in utils_scale_round and invoking it like utils_scale_round(... / 65535.0, 255). This gives me consistently the same result between Geany and GTK+. (See also gtk/gtkcolorsel.c, function scale_round.)

The only question, then, is why was the correct line in utils_scale_round commented out and replaced with a less correct one. But this happened before the initial Git import, so probably nobody knows anymore.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.