GNU bug report logs -
#15837
24.3; invalid colour conversion from Gtk+3 to X11
Previous Next
Reported by: Łukasz Stelmach <stlman <at> poczta.fm>
Date: Fri, 8 Nov 2013 18:29:01 UTC
Severity: normal
Tags: patch
Found in version 24.3
Done: Jan Djärv <jan.h.d <at> swipnet.se>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello,
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.
References:
[1] http://git.savannah.gnu.org/cgit/emacs.git/tree/src/gtkutil.c?id=c09a36ec78af479cb2ea39bf4bca8743cecd08df#n601
[2] http://cgit.freedesktop.org/xorg/doc/xorg-docs/tree/man/X.man?id=66e800c69fa5348b01e4b9670d6274ba392db7e5#n562
[3] http://cgit.freedesktop.org/xorg/lib/libX11/tree/src/xcms/LRGB.c?id=6cb02b166361200da35ba14f52cd9aaa493eb0ea#n224
--
Było mi bardzo miło. --- Rurku. --- ...
>Łukasz< --- To dobrze, że mnie słuchasz.
... Droga wśród jabłoni prowadzi w nieznane...
This bug report was last modified 11 years and 195 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.