Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background Color #207

Closed
skyexton opened this issue Apr 29, 2020 · 16 comments
Closed

Background Color #207

skyexton opened this issue Apr 29, 2020 · 16 comments

Comments

@skyexton
Copy link

skyexton commented Apr 29, 2020

How can I change the background color?

@EgorDuplensky
Copy link
Contributor

Configuration
You can find all the configuration in /etc/ly/config.ini. The file is commented, and includes the default values.

@skyexton
Copy link
Author

skyexton commented Apr 30, 2020

Can I use hex values?

@0d-billie
Copy link

0d-billie commented May 3, 2020

Can I Use Hex Values?

I would also like to know. The configuration is commented, but I'm not certain what the numbers for the background colour correspond to?

@skyexton
Copy link
Author

skyexton commented May 3, 2020

Same question

@Kharacternyk
Copy link

You may find this link helpful: https://askubuntu.com/questions/147462/how-can-i-change-the-tty-colors

@takagiy
Copy link

takagiy commented May 24, 2020

@xenbeta
I noted a workaround which works for me to use hex colors in #146.

@ghost
Copy link

ghost commented May 24, 2020

Well, to be honest config.ini isn't so much commented. The text background color id is quite ambiguous. It could, at least, specify a range of id to be used.

In my case, changing this value does nothing. My screen keeps black/white.

@Eklektisk
Copy link

You can find a list of color codes in termbox_next/termbox.h:

// Colors (see struct tb_cell's fg and bg fields).
#define TB_DEFAULT 0x00
#define TB_BLACK   0x01
#define TB_RED     0x02
#define TB_GREEN   0x03
#define TB_YELLOW  0x04
#define TB_BLUE    0x05
#define TB_MAGENTA 0x06
#define TB_CYAN    0x07
#define TB_WHITE   0x08

TB_DEFAULT is analogous to TB_BLACK for background colors and TB_WHITE for foreground colors. All other termbox colors are equivalent to their system color codes (TB_BLACK represents color0, TB_RED represents color1, etc...)

As a side note, the bg option only affects the background color for the login box and the shutdown/reboot options.

@ghost
Copy link

ghost commented Sep 20, 2020

Seriously, you should do the thing less tricky. Why not use normal strings or integers as normal people, like "red", "blue" or 2, 3, 4. I'm afraid not everyone understands this "colour table code" (not even me, I'm not a programmer!).

@plasmoduck
Copy link
Contributor

How did you get the whole background that dark blue/greyish color?

@TechieAndroid
Copy link

I'm also curious as to how you changed the background color entirely.

@Figuera
Copy link

Figuera commented Oct 25, 2020

I had this same problem and suffered a little to solve it. I will post here a summary of my research as a reference for the future:

The option bg in the configuration file is misleading. It don't change the color of the background but only the dialog box and the 'menu bar' at the top. That is, the actual background will always be pure black.

If you are still interested it takes values between 0 and 8, some comments suggest using '0x00' to '0x08' but at least for me that don't work. The colors are as described by #207 (comment), you can see the actual colors by opening the TTY (CTRL + ALT + F3) [EDIT: Remember to go back to your normal session use CTRL+ALT+F(1 or 2)] and sending the command msgcat --color=test. Changing the TTY colors as in this link won't work though, .bashrc or .zshrc are only loaded after login so any change won't affect ly.

The working solution is to change the colors of the TTY using systemd like was done here: #146.

You should add this line:

ExecStartPre=/usr/bin/printf '%%b' '\e]P0{background-color}\e]P7{foreground-color}\ec'

On file /lib/systemd/system/ly.service, line 7 (under [Service]). Change background-color and foreground-color to the RGB code of the desired color, don't use "#", see #146 for a working example. Note that this is changing the value of color 0 and color 7 so remember to keep the bg and fg as the default values in order for this to work.

@plasmoduck
Copy link
Contributor

I use FreeBSD, so no systemd here.

@plasmoduck
Copy link
Contributor

Guys, checkout my idea to use half blocks "quadrants" for the Doom Fire effect to make the fire a better resolution #236

@TechieAndroid
Copy link

Guys, checkout my idea to use half blocks "quadrants" for the Doom Fire effect to make the fire a better resolution #236

I've never seen someone hijack a github issue like this before.

In all honestly though, that's not related.

@nullgemm
Copy link
Collaborator

Changing the background color is not possible in Ly, and I don't plan on supporting it. However you can change the default TTY color palette with setcolors and even automate this with mkinitcpio-colors, this is what I do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants