- Subject: Re: Change colour of my jed
- From: Peter Bengtsson <peter@xxxxxxxxxx>
- Date: Mon, 26 Sep 2005 11:23:38 +0100
Thanks John!! That really works.
I've blogged about it here:
http://www.peterbe.com/plog/jed-looking-like-emacs
I'll keep working on it and hopefully get a final version ready of sharing soon.
2005/9/25, John E. Davis <davis@xxxxxxxxxxxxx>:
> Peter Bengtsson <mail@xxxxxxxxxxx> wrote:
> >I would like my jed (and xjed too if possible) to look more like the
> >colour theme of emacs (default on Mandriva)
>
> It is possible to do this in Xjed, but you will have to set the
> appropriate xterm resources if your want jed (running in the xterm) to
> use the colors.
>
> >like this: http://www.peterbe.com/TestSomething/Screenshot-emacs-py.png
> >Obviously it doesn't have to be perfectly so but I'm quite keen on
> >this look but not so kee on emacs (well, I've set my jed to emulate
> >emacs so missunderstand me correctly :).
>
> I downloaded the png image and cropped it. From the cropped image and
> the help of the slang script (appended below) I found the following
> colors:
>
> #2E4E4E 195807
> #F5DEB2 4786
> #BEBEBE 4201
> #FF7E23 1375
> #FF9F79 1371
> #00FFFF 1127
> #000000 1088
> #E6E6E6 440
> #AFBBC9 440
> #727272 431
> #86CEFA 134
>
> From those it was fairly easy to create a (partial) color scheme matching the
> one in the image:
>
> $1 = "#F5DEB2"; $2 = "#2E4E4E";
> set_color ("normal", $1, $2);
> set_color ("status", "#000000", "#BEBEBE");
> set_color ("comment", "#FF7E23", $2);
> set_color ("string", "#FF9F79", $2);
> set_color ("number", "#FF9F79", $2);
> set_color ("keyword", "#00FFFF", $2);
> set_color ("message", "#E6E6E6", $2);
> set_color ("delimiter", $1, $2);
> set_color ("operator", $1, $2);
>
> It is a partial color scheme because it does not specify the colors of
> preprocessor lines, etc. But this should be enough to get you
> started. If you use this, please post what your final color scheme.
>
> Here is the slang script. It works by reading the png image and
> creating a histogram of the resulting colors.
>
> #!/usr/bin/env slsh
> require ("png");
> require ("histogram");
>
> private define get_colors (file)
> {
> variable img = png_read (file) & 0xFFFFFF;
> variable rgb_grid = [0:0xFFFFFF];
> variable hist = hist1d (img, rgb_grid);
> variable i = where (hist != 0);
> return rgb_grid[i], hist[i];
> }
>
> define slsh_main ()
> {
> variable rgb, counts, i;
>
> (rgb, counts) = get_colors ("Screenshot-emacs-py-cropped.png");
> i = array_sort (counts);
> array_reverse (i);
> rgb = rgb[i];
> counts = counts[i];
> _for i (0, length (rgb)-1, 1)
> {
> () = fprintf (stdout, "#%06X %6d\n", rgb[i], counts[i]);
> }
> }
>
> --John
>
> --------------------------
> To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
> the word "unsubscribe" in the message body.
> Need help? Email <jed-users-owner@xxxxxxxxxxx>.
>
--
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com
[2005 date index]
[2005 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]