Re: Setting colors on atyfb framebuffer console.

Geert Uytterhoeven <[email protected]> Tue, 23 Oct 2007 09:56:23 +0200 (CEST)
Newsgroups gmane.linux.fbdev.user
Message-ID <Pine.LNX.4.64.0710230951480.7105@anakin>
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

---1463808512-1835044826-1193126183=:7105
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Mon, 22 Oct 2007, cga2000 wrote:
> 3 files x 16 entries define a 16-color palette with the three rgb
> channels in separate files.
> 
> So that if the first entry is 0 in all three files, color0 will be
> [rgb:0,0,0] (black) .. if it is 127 in all three files it will be
> [rgb:127,127,127] (grey50..?) etc.
> 
> If the second entry is 255 in the default_red file and 0 in both
> default_green and default_blue .. color1 will be pure red .. 
> 
> And naturally if I want color15 to be pure white the last entry in all
> three files needs to be set to 255.
> 
> Right?

Right!

> In other words the three files represent the three rgb channels and the
> 16 entries the different red, green, blue values for each of the 16
> colors the console is capable of displaying simultaneously.
> 
> But then why does the bash shell display my input commands in light grey
> rather than white?

Normal text is light grey.

> Does this mean that I have 8 x 2 colors and that some kind of a bold
> attribute being on of off as the application decides .. causes only text
> that is highlighted to be displayed in white while "normal" text is
> displayed in grey?

Yes, white is used for highlighted text.

> I don't suppose anyone has come up with a little utility that loops on
> the 3x16 entries and issues escape sequences to display a semi-graphical
> representation of the current color palette? Something that would
> display 8x2 squares visualizing the 16 colors.
> 
> This would make it a lot easier to tell at a glance what the current
> palette looks like .. although I'm sure that with a bit of practice I
> will be able to see it just by glancing at the default_{red|grn|blu}
> files.

I attached such a script I wrote many years ago (last modified in 2004).

However, it no longer displays the highlighted colors correctly on the
console or in a gnome-terminal?

It still works fine in a good old xterm.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds
---1463808512-1835044826-1193126183=:7105
Content-Type: TEXT/PLAIN; charset=UTF-8; name=colors
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.64.0710230956230.7105@anakin>
Content-Description: 
Content-Disposition: attachment; filename=colors

IyEvYmluL2Jhc2gNCkNTST0nG1snDQplY2hvIC1uICR7Q1NJfTdtDQplY2hv
ICR7Q1NJfTMwbSAiICAgICAgICAgICAgICAgICAgICBCTEFDSyAgICAgICAg
ICAgICAgICAgICAgICINCmVjaG8gJHtDU0l9MzFtICIgICAgICAgICAgICAg
ICAgICAgIFJFRCAgICAgICAgICAgICAgICAgICAgICAgIg0KZWNobyAke0NT
SX0zMm0gIiAgICAgICAgICAgICAgICAgICAgR1JFRU4gICAgICAgICAgICAg
ICAgICAgICAiDQplY2hvICR7Q1NJfTMzbSAiICAgICAgICAgICAgICAgICAg
ICBZRUxMT1cgICAgICAgICAgICAgICAgICAgICINCmVjaG8gJHtDU0l9MzRt
ICIgICAgICAgICAgICAgICAgICAgIEJMVUUgICAgICAgICAgICAgICAgICAg
ICAgIg0KZWNobyAke0NTSX0zNW0gIiAgICAgICAgICAgICAgICAgICAgTUFH
RU5UQSAgICAgICAgICAgICAgICAgICAiDQplY2hvICR7Q1NJfTM2bSAiICAg
ICAgICAgICAgICAgICAgICBDWUFOICAgICAgICAgICAgICAgICAgICAgICIN
CmVjaG8gJHtDU0l9MzdtICIgICAgICAgICAgICAgICAgICAgIFdISVRFICAg
ICAgICAgICAgICAgICAgICAgIg0KZWNobyAtbiAke0NTSX0xbQ0KZWNobyAk
e0NTSX0zMG0gIiAgICAgICAgICAgICAgICAgICAgQkxBQ0sgICAgICAgICAg
ICAgICAgICAgICAiDQplY2hvICR7Q1NJfTMxbSAiICAgICAgICAgICAgICAg
ICAgICBSRUQgICAgICAgICAgICAgICAgICAgICAgICINCmVjaG8gJHtDU0l9
MzJtICIgICAgICAgICAgICAgICAgICAgIEdSRUVOICAgICAgICAgICAgICAg
ICAgICAgIg0KZWNobyAke0NTSX0zM20gIiAgICAgICAgICAgICAgICAgICAg
WUVMTE9XICAgICAgICAgICAgICAgICAgICAiDQplY2hvICR7Q1NJfTM0bSAi
ICAgICAgICAgICAgICAgICAgICBCTFVFICAgICAgICAgICAgICAgICAgICAg
ICINCmVjaG8gJHtDU0l9MzVtICIgICAgICAgICAgICAgICAgICAgIE1BR0VO
VEEgICAgICAgICAgICAgICAgICAgIg0KZWNobyAke0NTSX0zNm0gIiAgICAg
ICAgICAgICAgICAgICAgQ1lBTiAgICAgICAgICAgICAgICAgICAgICAiDQpl
Y2hvICR7Q1NJfTM3bSAiICAgICAgICAgICAgICAgICAgICBXSElURSAgICAg
ICAgICAgICAgICAgICAgICINCmVjaG8gLW4gJHtDU0l9MG0NCg==

---1463808512-1835044826-1193126183=:7105
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
---1463808512-1835044826-1193126183=:7105
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Linux-fbdev-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-users

---1463808512-1835044826-1193126183=:7105--