How to change iPXE's and Advanced Menu's colors?
i have customized the menu a bit but i cannot really figure out howto change colors:
This is my boot menu:
Who is familar with this?
Lets say i could find out howto use that in my advanced menu, howto use other colors in the normal pxe menu? i don’t know where the source is?
here is my idea to give us more flexibility:
Would be nice to have.
i now got what i want, except the password dialog:
Where to find the settings for the password dialog?
btw. found it:
You’ll notice that the colors and cpair’s all transfer over to the advanced.php menu. I removed the setting as they were unnecessary for the advanced menu.
Something did change, but I do not have to specify what and or why it happened, though I try to with my commit statements.
The file that this is all set in is fog/lib/fog/BootMenu.class.php
I’m currently working to implement a form of hooking for the boot menu that will allow you to customize all these things using a hook or plugin system as you see fit.
I could manage the colors a bit in the meantime actually not for initial menu:
In the lastest svn advanced.php i cannot see how the initial values for the pxe menu are defined, also i see the my custom background bg.png in first menu but no definition for it like in svn before 2077
It’s actually not very simple as you can probably tell.
Here’s how I do it: This chnages the color for the value known as “green”
print "colour --rgb 0xff6600 2\n";
In the advanced configuration, you don’t need to add the print, quotes, the \n, or the semicolo. You can just put
colour --rgb 0xff6600 2
The text is done with the code:
If registered: These change the color for the default value of black
print "colour --rgb 0x00ff00 0\n";
If not registered
print "colour --rgb 0xff0000 0\n";
Again, the same rules apply that you don’t need the print, quotes, \n, or semicolon.
I think the most confusing part is that they use the --rgb but then you use hex color code to specify your colors.
The “matrix” works on a double system.
The foreground refers to the text while the background refers to the “behind” the text or highligh.
0 is the “main background”. The “single” digit numbers refer to the “default” colors in use.
The cpair is where things get interesting. This is where you specify how to use the colors your specified (or completely change them all)
The lines I use:
print "cpair --foreground 7 --background 2 2\n";
What you would use:
cpair --foreground 7 --background 2 2
What it does:
It set’s the text color to while (ANSI number 7) and the background color to 2 which I reset above for highlighted text(–background 2 is the color I specified or in ANSI green) and the ending 2 specifies the “highlighted” text.
I hope this helps.