change tricolor text theme

Ray Strode halfline at gmail.com
Fri Jul 29 07:42:09 PDT 2011


Hi,

>  ply_terminal_set_color_hex_value (terminal,
>                                    PLY_TERMINAL_COLOR_BLACK,
>                                    0x000000);
0x000000 is black.

>  ply_terminal_set_color_hex_value (terminal,
>                                    PLY_TERMINAL_COLOR_WHITE,
>                                    0xffffff);

0xffffffff is white.

>  ply_terminal_set_color_hex_value (terminal,
>                                    PLY_TERMINAL_COLOR_BLUE,
>                                    0xCC0000);
0xcc0000 is light red.

>  ply_terminal_set_color_hex_value (terminal,
>                                    PLY_TERMINAL_COLOR_BROWN,
>                                    0x700000);
0x700000 is dark red.

These numbers are just like html colors but with 0x in front instead of #

Don't be dissuaded by the color swatch names (PLY_TERMINAL_COLOR_BLUE
or whatever).   Those are just symbolic names. I used descriptive
names like COLOR_BLUE, COLOR_BLACK etc instead of COLOR_1, COLOR_2, in
the API because terminals historically have used specific colors in
specific positions by default.

> You have mentioned some kind of config file. Where can I find that?
well, it's a theme file.  The one you're looking at is here:

/usr/share/plymouth/theme/text/text.plymouth

It's not meant to be edited by administrators, though.  It's used by
theme authors.  And it doesn't currently expose those three colors.
Basically what needs to happen is:

- create_plugin needs to call ply_key_file_get_value() 3 times (once
for each new key in text.plymouth, and stuff those 3 values into the
plugin structure.

- Then those three values need to get used in the function quoted in
this thread instead of the hard coded numbers.

--Ray


More information about the plymouth mailing list