Improvements for the help page of color
Opened this issue · 2 comments
Hi,
while reading your source code, I noticed that the help page for "color" is incomplete.
help color (UEFI):
https://github.com/chenall/grub4dos/blob/efi/stage2/builtins.c#L2021
help color (normal, no UEFI):
https://github.com/chenall/grub4dos/blob/master/stage2/builtins.c#L3339
Based on the help page you should use
FG/BG. FG and BG are symbolic color names
for color definition in GRUB4DOS and
some hex numbers for GRUB4DOS (UEFI).
First some nice discovery: Both versions works in GRUB4DOS and GRUB4DOS (UEFI). Also both versions works in text mode and in graphics mode. Using the command "color" in the command line return the hex numbers for your currently selected color names, thanks for this nice help!
So these color definitions works for me every time:
color white/blue white/cyan
or
color normal=0x000000aa00ffffff highlight=0x0000aaaa00ffffff
or this nice mix of both worlds (great readability!)
color normal=white/blue highlight=white/cyan
First problem:
In text mode the border has the same colour as "normal". Once you switch to graphics mode the color of the border is a different color. You have to set it using color border=white/blue
or
color border=0x000000aa00ffffff
Perhaps we can append the border color as optional argument to this one
color NORMAL [HIGHLIGHT [HELPTEXT [HEADING ]]]
or use the normal color for the border in graphics mode too.
Second problem:
In the help page for UEFI the hex numbers should have the same length, as reported by the color command (no arguments). E.g. instead of 0x888800000000 you should write 0x0000888800000000.
Third problem:
The help page for UEFI does not explain the parts of the 64 bit number. This number actually holds foreground color and background color:
0x000000aa00ffffff
- 0x000000aa = background color = blue
- 0x00ffffff = foreground color = white
Fourth problem:
https://rmprepusb.com/tutorials/021-guide-to-grub4dos/
note that if in graphics hi-res mode, the background colour for normal text and help text will be ignored and will be set to transparent.
This should also be added to the help page for UEFI.
0.4.5c is an old version, not discussed here.
For compatibility, 4-bit color is reserved. 24 (32) bit color is recommended.
- Have been adjusted.
- adoption.
- add description.
- Add to.
Thanks. I am very bad in writing documentation so you better update the help page on your own.