From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1IDoBY-00040y-9h for mharc-grub-devel@gnu.org; Wed, 25 Jul 2007 17:14:20 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IDoBX-00040E-B0 for grub-devel@gnu.org; Wed, 25 Jul 2007 17:14:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IDoBW-0003zq-Ri for grub-devel@gnu.org; Wed, 25 Jul 2007 17:14:18 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IDoBW-0003zn-I6 for grub-devel@gnu.org; Wed, 25 Jul 2007 17:14:18 -0400 Received: from pne-smtpout4-sn1.fre.skanova.net ([81.228.11.168]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IDoBW-0003o4-1Y for grub-devel@gnu.org; Wed, 25 Jul 2007 17:14:18 -0400 Received: from [127.0.0.1] (88.193.32.97) by pne-smtpout4-sn1.fre.skanova.net (7.2.075) id 45C775BA007E07BB for grub-devel@gnu.org; Wed, 25 Jul 2007 23:14:17 +0200 Message-ID: <46A7BD2C.50609@nic.fi> Date: Thu, 26 Jul 2007 00:14:20 +0300 From: =?ISO-8859-1?Q?Vesa_J=E4=E4skel=E4inen?= User-Agent: Thunderbird 2.0.0.5 (Windows/20070716) MIME-Version: 1.0 To: The development of GRUB 2 References: <20070725205327.GA2153@aragorn> In-Reply-To: <20070725205327.GA2153@aragorn> X-Enigmail-Version: 0.95.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: Quoted-Printable X-detected-kernel: Solaris 8 (1) Subject: Re: [RFC] color command X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Jul 2007 21:14:19 -0000 Robert Millan wrote: > Hi, >=20 > I'd like to discuss the possibility of providing functionality equivale= nt to > the "color" command in GRUB Legacy. >=20 > One of the downsides of how color worked in GRUB Legacy is that interna= lly > colors were handled by GRUB directly as VGA codes. Since this isn't po= rtable, > I suggest that we avoid it completely instead of just mapping them for > platforms using non-VGA tables (I've seen that ofconsole is using RGB s= tructs). >=20 > The solution I propose would be to have a "color" variable (and another= one for > highlight color?) with human readable names based on the list in GRUB L= egacy, > and let each terminal parse that and pull their colors during initialis= ation > (this has the downside that one would have to reinitialise terminal aft= er > changing color, but this seems to be akin to the gfxterm / gfxmode situ= ation > and I think is reasonable). >=20 > Any comments? Should I go on implementing that? >=20 Hi, One idea was to define themable colors and then use grub_video_map_color to map this to hardware (color index or RGB value): http://grub.enbug.org/VideoSubsystem#head-0df1ed220076ff6cc8188d1a192a21d= 443cc2456 You could define normal VGA color with like GRUB_COLOR_{WHITE|BLACK|LIGHT_GREEN|YELLOW...}. Then setup theme to map GRUB_COLOR_CONSOLE_BACKGROUND->GRUB_COLOR_BLACK and GRUB_COLOR_CONSOLE_FOREGROUND->GRUB_COLOR_LIGHT_GREEN. Of course we have this missing component 'theme support' here ;) You can make dynamic variables in GRUB so that when you set it it will call function (which could call proper {term|theme}->set color function). I would rather resolve this issue at same time when resolving graphical menu issues (meaning within graphical menu subproject) (still looking for more members ;)): http://grub.enbug.org/Subprojects http://grub.enbug.org/Subprojects/GraphicalMenu Thanks, Vesa J=E4=E4skel=E4inen