adi1090x / plymouth-themes

A huge collection (80+) of plymouth themes ported from android bootanimations
GNU General Public License v3.0
1.72k stars 114 forks source link

Newbie ? about changing color #34

Closed Paulie420 closed 1 year ago

Paulie420 commented 2 years ago

What programming language are these themes written in? I'm using colorful_sliced and want to change the colors of the text when entering my cryptlvm password. Currently it shows in white and I'd like to color both the line that prompts for password and the bullet.image characters that are echoed on screen when entering the password. I think I might just change:

bullet.image = Image.Text("$", 1, 1, 1); prompt.image = Image.Text("fRAME.wORK cRYPT pASSW0RD>>>", 1, 1, 1);

As I believe the 1,1,1 might contain color values; but as you can tell I'm already over my head. I'd really love to have multiple colors in each, like a rainbow, but thats not needed. :P

PS, thanks for porting these over from the Android collection - super awesome!

Paulie420 commented 2 years ago

Heres info I found, in case anyone else was wondering the same...

Plymouth Images

To create a new image you need to supply the filename of the image within the theme image directory to 
Image, e.g.

box_image = Image ("box.png");
logo_image = Image ("special://logo");   # "special://logo" is a special keyword which finds the logo image

You can also create images from text. These are useful to show text messages, e.g.

warning_image = Image.Text ("System running FSCK. This may take some time");

The default is white text color, but you can supply additional parameters of: red, green, blue, alpha, fontname 
and alignment. Default font is "Sans 12" and default alignment is "left". Alignement is only useful for multi-line 
text, and its possible values are "left", "center", or "right".

warning_image = Image.Text ("I feel faded", 0.8, 0.8, 0.8, 0.8, "Fixed");

The width and height of an image can be attained using GetWidth and GetHeight, e.g.

logo_area = logo_image.GetWidth() * logo_image.GetHeight();

An image can be rotated or scaled using Rotate and Scale, e.g.

upside_down_logo_image = logo_image.Rotate (3.1415); # the second paramiter is the angle in radians
fat_logo_image = logo_image.Scale (logo_image.GetWidth() * 2 , logo_image.GetHeight ()) # make the image twice the width

But simply changing the 1, 1, 1 to 128, 128, 128 didn't change the color? Funny, as I thought I'd misread it and first changed it to red, 1, 1, 1 and that DID change the text to cyan - lol, not red... but hoping anyone can answer what I'm missing. Thanks; the answer looks to be in the snippet above, I just need a little help. :P

adi1090x commented 1 year ago

This is what you're looking for

Use colorhexa to convert colors.