[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15837: 24.3; invalid colour conversion from Gtk+3 to X11

From: Łukasz Stelmach
Subject: bug#15837: 24.3; invalid colour conversion from Gtk+3 to X11
Date: Fri, 08 Nov 2013 19:16:18 +0100


The function[1] that reads foreground and background colours from Gtk+3
(GdkRGBA) and converts them to X11 ones (XColor) uses improper
intermediate representation. The Gtk coulour is formated as
rgbi:<red>/<green>/<blue>. Although values prefixed with rgbi: are meant
to be floating point values like the ones returned by
gtk_style_context_get_*() functions but unlike Gtk colours they are
meant to be linear intensity values and will be gamma corrected[2] using
the tables[3] in Xlib.

You can check the effect for yourself by running:

xterm -bg '#777'
xterm -bg 'rgb:7777/7777/7777'
xterm -bg 'rgb:0.46667/0.46667/0.46667'

The last one will be significantly lighter.

0.46667/0.46667/0.46667 is the value returned by Gtk when a colour is
set to #777.

A patch will follow this report.




Było mi bardzo miło.                                  --- Rurku. --- ...
>Łukasz<                                --- To dobrze, że mnie słuchasz.

... Droga wśród jabłoni prowadzi w nieznane...

reply via email to

[Prev in Thread] Current Thread [Next in Thread]