* Default colours in X11 frames?
@ 2008-07-20 18:44 James Cloos
2008-07-20 22:28 ` David De La Harpe Golden
0 siblings, 1 reply; 8+ messages in thread
From: James Cloos @ 2008-07-20 18:44 UTC (permalink / raw
To: emacs-devel
I notice that my compile of CVS from yesterday has new colours for many
faces.
Did I miss any changes (my last compile was from before the ns merge)
from the commit list which would affect how colours are presented to
the X server?
As an example, gnus' message-header-xheader face says Foreground: blue
but is displaying as purple. The other message-header faces (using
cornflower blue and steel blue) look correct (but a comparison shows
that they, too, are off; just not as much as blue is).
Also, font-local-comment-face, using Firebrick, looks brighter than
it used to.
I also updated the X server at that time (from its Git master), but
other apps seem to have the same colours. I definitely do not get
the same colours from this emacs compile as I do from, eg:
:; ppmmake <colorname> 640 640|xv -
Interestingly, my background colour, LightYellow2, looks the same as
in other apps. As does black.
-JimC
--
James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Default colours in X11 frames?
2008-07-20 18:44 Default colours in X11 frames? James Cloos
@ 2008-07-20 22:28 ` David De La Harpe Golden
2008-07-21 2:34 ` Adrian Robert
2008-07-21 13:14 ` James Cloos
0 siblings, 2 replies; 8+ messages in thread
From: David De La Harpe Golden @ 2008-07-20 22:28 UTC (permalink / raw
To: James Cloos; +Cc: emacs-devel
James Cloos wrote:
> I notice that my compile of CVS from yesterday has new colours for many
> faces.
> Also, font-local-comment-face, using Firebrick, looks brighter than
> it used to.
Do
(color-values "blue")
and
(color-values "firebrick")
return the same values on pre- and post- merge builds for you?
- they do for me, and I don't seem to see color differences (checked
with the gimp too). While the NS port _did_ introduce a load of its own
color handling stuff (including some pretty gratuitous-looking color
database duplication - emacs/etc/Emacs.clr vs. emacs/etc/rgb.txt ), it
seems to be confined to NS-specific code paths.
> I also updated the X server at that time (from its Git master), but
> other apps seem to have the same colours.
N.B. There have been relatively recent changes to the x.org named color
handling - rgb.txt got deprecated, now the server ignores RGBPath and
uses a compiled-in list (effectively the same values as the historic
default rgb.txt though), and libX11 defaults to trying Xcms before the
server list. That said, I'd naively expect any weirdness in named-color
resolution on the X side to affect all apps using it equally, so it
probably doesn't explain it.
http://lists.freedesktop.org/archives/xorg/2008-April/034408.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Default colours in X11 frames?
2008-07-20 22:28 ` David De La Harpe Golden
@ 2008-07-21 2:34 ` Adrian Robert
2008-07-21 13:14 ` James Cloos
1 sibling, 0 replies; 8+ messages in thread
From: Adrian Robert @ 2008-07-21 2:34 UTC (permalink / raw
To: emacs-devel
David De La Harpe Golden <david <at> harpegolden.net> writes:
> While the NS port _did_ introduce a load of its own
> color handling stuff (including some pretty gratuitous-looking color
> database duplication - emacs/etc/Emacs.clr vs. emacs/etc/rgb.txt ), it
> seems to be confined to NS-specific code paths.
From a grep, etc/rgb.txt appears to be used by the W32 port only.
It would be good to share such databases and people are
working on this, but the NS port and the W32 one were developed
independently so some work will need to be done.
Note, both Carbon *and* W32 ports define full equivalent
data to etc/rgb.txt inside their source code.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Default colours in X11 frames?
2008-07-20 22:28 ` David De La Harpe Golden
2008-07-21 2:34 ` Adrian Robert
@ 2008-07-21 13:14 ` James Cloos
2008-07-21 13:30 ` David Kastrup
1 sibling, 1 reply; 8+ messages in thread
From: James Cloos @ 2008-07-21 13:14 UTC (permalink / raw
To: emacs-devel; +Cc: David De La Harpe Golden
>>>>> "David" == David De La Harpe Golden <david@harpegolden.net> writes:
David> Do
David> (color-values "blue")
David> and
David> (color-values "firebrick")
David> return the same values on pre- and post- merge builds for you?
Thanks. That was the cluebat I needed.
It allowed me to narrow the problem down to XParseColor(3x).
In effect, instead of matching the equivilent of the pcre /^colour$/i
it is doing the equivilent of the pcre /^colour/i on a shuffle of the
colour list.
So when I ask for 'firebrick' it gived me 'firebrick2'. And for 'blue'
it returns 'blue violet' aka 'BlueViolet'.
I've tracked down the bug (in the X server) and will fix it.
-JimC
--
James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Default colours in X11 frames?
2008-07-21 13:14 ` James Cloos
@ 2008-07-21 13:30 ` David Kastrup
2008-07-21 20:13 ` James Cloos
0 siblings, 1 reply; 8+ messages in thread
From: David Kastrup @ 2008-07-21 13:30 UTC (permalink / raw
To: James Cloos; +Cc: David De La Harpe Golden, emacs-devel
James Cloos <cloos@jhcloos.com> writes:
>>>>>> "David" == David De La Harpe Golden <david@harpegolden.net> writes:
>
> David> Do
> David> (color-values "blue")
> David> and
> David> (color-values "firebrick")
>
> David> return the same values on pre- and post- merge builds for you?
>
> Thanks. That was the cluebat I needed.
>
> It allowed me to narrow the problem down to XParseColor(3x).
>
> In effect, instead of matching the equivilent of the pcre /^colour$/i
> it is doing the equivilent of the pcre /^colour/i on a shuffle of the
> colour list.
>
> So when I ask for 'firebrick' it gived me 'firebrick2'. And for 'blue'
> it returns 'blue violet' aka 'BlueViolet'.
>
> I've tracked down the bug (in the X server) and will fix it.
Will you fix it in Emacs or in X? If the latter: is there a workaround
one could use in Emacs for people having an unfixed X? If the former:
will you report this to whoever is working on the X server?
Thanks,
--
David Kastrup
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Default colours in X11 frames?
2008-07-21 13:30 ` David Kastrup
@ 2008-07-21 20:13 ` James Cloos
2008-07-22 4:04 ` James Cloos
2008-07-22 17:16 ` James Cloos
0 siblings, 2 replies; 8+ messages in thread
From: James Cloos @ 2008-07-21 20:13 UTC (permalink / raw
To: David Kastrup; +Cc: emacs-devel, David De La Harpe Golden
[-- Attachment #1: Type: text/plain, Size: 844 bytes --]
>>>>> "David" == David Kastrup <dak@gnu.org> writes:
David> Will you fix it in Emacs or in X?
In X.
David> If the latter: is there a workaround one could use in Emacs for
David> people having an unfixed X?
In theory. Were one to take rgb.txt (Emacs' copy will work) and convert
it into the format used by Xcms.txt (/usr/lib/X11/Xcms.txt on Gentoo,
probably the same on most other dists) then libX11 would find the colour
name when it searches that and wouldn't bother to ask the server.
Everthing before the line:
XCMS_COLORDB_START 0.1
is ignored. As is everything after the line:
XCMS_COLORDB_END
And rgb.txt line such as:
255 250 250 snow
could look like this in Xcms.txt:
cms snow rgb:255/250/250
Something like this perl script, which reads from either stdin or
its filename arguments and writes to stdout, should do it:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-perl, Size: 526 bytes --]
#!/usr/bin/perl
print "XCMS_COLORDB_START 0.1\n";
# print the colours from the default Xcms.txt
print "cms red\t\tCIEXYZ:0.3811/0.2073/0.0213\n";
print "cms green\t\tCIEXYZ:0.3203/0.6805/0.1430\n";
print "cms blue\t\tCIEXYZ:0.2483/0.1122/1.2417\n";
# then convert all of the rgb.txt colours
while (<>) {
next if /^#/;
next if /^$/;
chomp;
my @line=split;
print join(" ",@line[3..$#line]);
printf("\t\t\trgb:%x/%x/%x\n", $line[0], $line[1], $line[2]);
}
print "XCMS_COLORDB_END\n";
exit;
[-- Attachment #3: Type: text/plain, Size: 75 bytes --]
-JimC
--
James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Default colours in X11 frames?
2008-07-21 20:13 ` James Cloos
@ 2008-07-22 4:04 ` James Cloos
2008-07-22 17:16 ` James Cloos
1 sibling, 0 replies; 8+ messages in thread
From: James Cloos @ 2008-07-22 4:04 UTC (permalink / raw
To: James Cloos
[-- Attachment #1: Type: text/plain, Size: 133 bytes --]
It turns out rgb:12/3/45 is the same as rgb:12/33/45 rather than
rgb:12/03/45, so that perl script needs to use %02x in its printf:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: rgb2xcms.pl --]
[-- Type: text/x-perl; name=rgb2xcms.pl, Size: 532 bytes --]
#!/usr/bin/perl
print "XCMS_COLORDB_START 0.1\n";
# print the colours from the default Xcms.txt
print "cms red\t\tCIEXYZ:0.3811/0.2073/0.0213\n";
print "cms green\t\tCIEXYZ:0.3203/0.6805/0.1430\n";
print "cms blue\t\tCIEXYZ:0.2483/0.1122/1.2417\n";
# then convert all of the rgb.txt colours
while (<>) {
next if /^#/;
next if /^$/;
chomp;
my @line=split;
print join(" ",@line[3..$#line]);
printf("\t\t\trgb:%02x/%02x/%02x\n", $line[0], $line[1], $line[2]);
}
print "XCMS_COLORDB_END\n";
exit;
[-- Attachment #3: Type: text/plain, Size: 75 bytes --]
-JimC
--
James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Default colours in X11 frames?
2008-07-21 20:13 ` James Cloos
2008-07-22 4:04 ` James Cloos
@ 2008-07-22 17:16 ` James Cloos
1 sibling, 0 replies; 8+ messages in thread
From: James Cloos @ 2008-07-22 17:16 UTC (permalink / raw
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 133 bytes --]
It turns out rgb:12/3/45 is the same as rgb:12/33/45 rather than
rgb:12/03/45, so that perl script needs to use %02x in its printf:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: rgb2xcms.pl --]
[-- Type: text/x-perl; name=rgb2xcms.pl, Size: 532 bytes --]
#!/usr/bin/perl
print "XCMS_COLORDB_START 0.1\n";
# print the colours from the default Xcms.txt
print "cms red\t\tCIEXYZ:0.3811/0.2073/0.0213\n";
print "cms green\t\tCIEXYZ:0.3203/0.6805/0.1430\n";
print "cms blue\t\tCIEXYZ:0.2483/0.1122/1.2417\n";
# then convert all of the rgb.txt colours
while (<>) {
next if /^#/;
next if /^$/;
chomp;
my @line=split;
print join(" ",@line[3..$#line]);
printf("\t\t\trgb:%02x/%02x/%02x\n", $line[0], $line[1], $line[2]);
}
print "XCMS_COLORDB_END\n";
exit;
[-- Attachment #3: Type: text/plain, Size: 75 bytes --]
-JimC
--
James Cloos <cloos@jhcloos.com> OpenPGP: 1024D/ED7DAEA6
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-07-22 17:16 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-20 18:44 Default colours in X11 frames? James Cloos
2008-07-20 22:28 ` David De La Harpe Golden
2008-07-21 2:34 ` Adrian Robert
2008-07-21 13:14 ` James Cloos
2008-07-21 13:30 ` David Kastrup
2008-07-21 20:13 ` James Cloos
2008-07-22 4:04 ` James Cloos
2008-07-22 17:16 ` James Cloos
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.