You are not logged in.

#1 2025-05-10 19:26:44

Irelandnokuro
Member
Registered: 2025-05-10
Posts: 8

[SOLVED]How do i change the ls colors?

i use hyprland as a wm, when i was trying to install a theme from github my ls colors just changed so i tried to revert them back, i looked through forums and guides for hours yet to no avail.
the last thing i did was to run:

$ dircolors -b

and copy the output to ~/.bashrc
so here's my .bashrc file:

alias ls="ls --color=auto"
alias la="ls -la"

LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=00:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.7z=01;31:*.ace=01;31:*.alz=01;31:*.apk=01;31:*.arc=01;31:*.arj=01;31:*.bz=01;31:*.bz2=01;31:*.cab=01;31:*.cpio=01;31:*.crate=01;31:*.deb=01;31:*.drpm=01;31:*.dwm=01;31:*.dz=01;31:*.ear=01;31:*.egg=01;31:*.esd=01;31:*.gz=01;31:*.jar=01;31:*.lha=01;31:*.lrz=01;31:*.lz=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.lzo=01;31:*.pyz=01;31:*.rar=01;31:*.rpm=01;31:*.rz=01;31:*.sar=01;31:*.swm=01;31:*.t7z=01;31:*.tar=01;31:*.taz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tgz=01;31:*.tlz=01;31:*.txz=01;31:*.tz=01;31:*.tzo=01;31:*.tzst=01;31:*.udeb=01;31:*.war=01;31:*.whl=01;31:*.wim=01;31:*.xz=01;31:*.z=01;31:*.zip=01;31:*.zoo=01;31:*.zst=01;31:*.avif=01;35:*.jpg=01;35:*.jpeg=01;35:*.jxl=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.webp=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:*~=00;90:*#=00;90:*.bak=00;90:*.crdownload=00;90:*.dpkg-dist=00;90:*.dpkg-new=00;90:*.dpkg-old=00;90:*.dpkg-tmp=00;90:*.old=00;90:*.orig=00;90:*.part=00;90:*.rej=00;90:*.rpmnew=00;90:*.rpmorig=00;90:*.rpmsave=00;90:*.swp=00;90:*.tmp=00;90:*.ucf-dist=00;90:*.ucf-new=00;90:*.ucf-old=00;90:';
export LS_COLORS

Edit: Here's how I solved It:
First run:

$ dircolors -b

And copy and paste the output to your ~/.bashrc file.
Then you can run:

$ dircolors --print-ls-colors

There you can compare the type of file with the color and then if you don't like the color for a certain file you can find it in the section you just added to ~/.bashrc and change the value to the color you like from the previous command.

Last edited by Irelandnokuro (2025-05-11 13:11:48)

Offline

#2 2025-05-10 19:48:08

cmt
Member
Registered: 2025-03-11
Posts: 22

Re: [SOLVED]How do i change the ls colors?

Colors have always worked for me with 

alias ls="ls --color=auto"

What terminal are you using?

Offline

#3 2025-05-10 19:52:57

Irelandnokuro
Member
Registered: 2025-05-10
Posts: 8

Re: [SOLVED]How do i change the ls colors?

cmt wrote:

What terminal are you using?

kittty, aka "xterm-kitty"
Also, just thought I'd clarify, but my colors do work, they're just extremely ugly and hard to read.

Last edited by Irelandnokuro (2025-05-10 19:54:42)

Offline

#4 2025-05-10 19:55:57

cmt
Member
Registered: 2025-03-11
Posts: 22

Re: [SOLVED]How do i change the ls colors?

try changing your .bashrc to just have those first two lines if you haven't already.

Offline

#5 2025-05-10 19:57:02

Irelandnokuro
Member
Registered: 2025-05-10
Posts: 8

Re: [SOLVED]How do i change the ls colors?

cmt wrote:

try changing your .bashrc to just have those first two lines if you haven't already.

I have, it doesn't work though:/

Offline

#6 2025-05-10 21:21:06

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,329

Re: [SOLVED]How do i change the ls colors?

install a theme from github my ls colors just changed

chances are that "theme from grubhub" configures your colors?

Did only the dircolor assignement change or the entire palette (ie. *.mp3 is styll cyan - it's just the wrong kind of cyan)
What "theme from hubgrit"? And what does

    for x in 0 1 4 5 7 8; do
        for i in {30..37}; do
            for a in {40..47}; do
                printf "\e[$x;$i;$a""m\\\e[$x;$i;$a""m\e[0m "
            done
            echo
        done
    done
    echo

look like?

Offline

#7 2025-05-11 12:50:10

Irelandnokuro
Member
Registered: 2025-05-10
Posts: 8

Re: [SOLVED]How do i change the ls colors?

seth wrote:

Did only the dircolor assignement change or the entire palette (ie. *.mp3 is styll cyan - it's just the wrong kind of cyan)

I'm not sure if I fully understand, but it's not a different type of the same color, it's just an entirely different color.

Also when I run:

    for x in 0 1 4 5 7 8; do
        for i in {30..37}; do
            for a in {40..47}; do
                printf "\e[$x;$i;$a""m\\\e[$x;$i;$a""m\e[0m "
            done
            echo
        done
    done
    echo

It returns:

\e[0;30;40m \e[0;30;41m \e[0;30;42m \e[0;30;43m \e[0;30;44m \e[0;30;45m \e[0;30;46m \e[0;30;47m 
\e[0;31;40m \e[0;31;41m \e[0;31;42m \e[0;31;43m \e[0;31;44m \e[0;31;45m \e[0;31;46m \e[0;31;47m 
\e[0;32;40m \e[0;32;41m \e[0;32;42m \e[0;32;43m \e[0;32;44m \e[0;32;45m \e[0;32;46m \e[0;32;47m 
\e[0;33;40m \e[0;33;41m \e[0;33;42m \e[0;33;43m \e[0;33;44m \e[0;33;45m \e[0;33;46m \e[0;33;47m 
\e[0;34;40m \e[0;34;41m \e[0;34;42m \e[0;34;43m \e[0;34;44m \e[0;34;45m \e[0;34;46m \e[0;34;47m 
\e[0;35;40m \e[0;35;41m \e[0;35;42m \e[0;35;43m \e[0;35;44m \e[0;35;45m \e[0;35;46m \e[0;35;47m 
\e[0;36;40m \e[0;36;41m \e[0;36;42m \e[0;36;43m \e[0;36;44m \e[0;36;45m \e[0;36;46m \e[0;36;47m 
\e[0;37;40m \e[0;37;41m \e[0;37;42m \e[0;37;43m \e[0;37;44m \e[0;37;45m \e[0;37;46m \e[0;37;47m 
\e[1;30;40m \e[1;30;41m \e[1;30;42m \e[1;30;43m \e[1;30;44m \e[1;30;45m \e[1;30;46m \e[1;30;47m 
\e[1;31;40m \e[1;31;41m \e[1;31;42m \e[1;31;43m \e[1;31;44m \e[1;31;45m \e[1;31;46m \e[1;31;47m 
\e[1;32;40m \e[1;32;41m \e[1;32;42m \e[1;32;43m \e[1;32;44m \e[1;32;45m \e[1;32;46m \e[1;32;47m 
\e[1;33;40m \e[1;33;41m \e[1;33;42m \e[1;33;43m \e[1;33;44m \e[1;33;45m \e[1;33;46m \e[1;33;47m 
\e[1;34;40m \e[1;34;41m \e[1;34;42m \e[1;34;43m \e[1;34;44m \e[1;34;45m \e[1;34;46m \e[1;34;47m 
\e[1;35;40m \e[1;35;41m \e[1;35;42m \e[1;35;43m \e[1;35;44m \e[1;35;45m \e[1;35;46m \e[1;35;47m 
\e[1;36;40m \e[1;36;41m \e[1;36;42m \e[1;36;43m \e[1;36;44m \e[1;36;45m \e[1;36;46m \e[1;36;47m 
\e[1;37;40m \e[1;37;41m \e[1;37;42m \e[1;37;43m \e[1;37;44m \e[1;37;45m \e[1;37;46m \e[1;37;47m 
\e[4;30;40m \e[4;30;41m \e[4;30;42m \e[4;30;43m \e[4;30;44m \e[4;30;45m \e[4;30;46m \e[4;30;47m 
\e[4;31;40m \e[4;31;41m \e[4;31;42m \e[4;31;43m \e[4;31;44m \e[4;31;45m \e[4;31;46m \e[4;31;47m 
\e[4;32;40m \e[4;32;41m \e[4;32;42m \e[4;32;43m \e[4;32;44m \e[4;32;45m \e[4;32;46m \e[4;32;47m 
\e[4;33;40m \e[4;33;41m \e[4;33;42m \e[4;33;43m \e[4;33;44m \e[4;33;45m \e[4;33;46m \e[4;33;47m 
\e[4;34;40m \e[4;34;41m \e[4;34;42m \e[4;34;43m \e[4;34;44m \e[4;34;45m \e[4;34;46m \e[4;34;47m 
\e[4;35;40m \e[4;35;41m \e[4;35;42m \e[4;35;43m \e[4;35;44m \e[4;35;45m \e[4;35;46m \e[4;35;47m 
\e[4;36;40m \e[4;36;41m \e[4;36;42m \e[4;36;43m \e[4;36;44m \e[4;36;45m \e[4;36;46m \e[4;36;47m 
\e[4;37;40m \e[4;37;41m \e[4;37;42m \e[4;37;43m \e[4;37;44m \e[4;37;45m \e[4;37;46m \e[4;37;47m 
\e[5;30;40m \e[5;30;41m \e[5;30;42m \e[5;30;43m \e[5;30;44m \e[5;30;45m \e[5;30;46m \e[5;30;47m 
\e[5;31;40m \e[5;31;41m \e[5;31;42m \e[5;31;43m \e[5;31;44m \e[5;31;45m \e[5;31;46m \e[5;31;47m 
\e[5;32;40m \e[5;32;41m \e[5;32;42m \e[5;32;43m \e[5;32;44m \e[5;32;45m \e[5;32;46m \e[5;32;47m 
\e[5;33;40m \e[5;33;41m \e[5;33;42m \e[5;33;43m \e[5;33;44m \e[5;33;45m \e[5;33;46m \e[5;33;47m 
\e[5;34;40m \e[5;34;41m \e[5;34;42m \e[5;34;43m \e[5;34;44m \e[5;34;45m \e[5;34;46m \e[5;34;47m 
\e[5;35;40m \e[5;35;41m \e[5;35;42m \e[5;35;43m \e[5;35;44m \e[5;35;45m \e[5;35;46m \e[5;35;47m 
\e[5;36;40m \e[5;36;41m \e[5;36;42m \e[5;36;43m \e[5;36;44m \e[5;36;45m \e[5;36;46m \e[5;36;47m 
\e[5;37;40m \e[5;37;41m \e[5;37;42m \e[5;37;43m \e[5;37;44m \e[5;37;45m \e[5;37;46m \e[5;37;47m 
\e[7;30;40m \e[7;30;41m \e[7;30;42m \e[7;30;43m \e[7;30;44m \e[7;30;45m \e[7;30;46m \e[7;30;47m 
\e[7;31;40m \e[7;31;41m \e[7;31;42m \e[7;31;43m \e[7;31;44m \e[7;31;45m \e[7;31;46m \e[7;31;47m 
\e[7;32;40m \e[7;32;41m \e[7;32;42m \e[7;32;43m \e[7;32;44m \e[7;32;45m \e[7;32;46m \e[7;32;47m 
\e[7;33;40m \e[7;33;41m \e[7;33;42m \e[7;33;43m \e[7;33;44m \e[7;33;45m \e[7;33;46m \e[7;33;47m 
\e[7;34;40m \e[7;34;41m \e[7;34;42m \e[7;34;43m \e[7;34;44m \e[7;34;45m \e[7;34;46m \e[7;34;47m 
\e[7;35;40m \e[7;35;41m \e[7;35;42m \e[7;35;43m \e[7;35;44m \e[7;35;45m \e[7;35;46m \e[7;35;47m 
\e[7;36;40m \e[7;36;41m \e[7;36;42m \e[7;36;43m \e[7;36;44m \e[7;36;45m \e[7;36;46m \e[7;36;47m 
\e[7;37;40m \e[7;37;41m \e[7;37;42m \e[7;37;43m \e[7;37;44m \e[7;37;45m \e[7;37;46m \e[7;37;47m 
\e[8;30;40m \e[8;30;41m \e[8;30;42m \e[8;30;43m \e[8;30;44m \e[8;30;45m \e[8;30;46m \e[8;30;47m 
\e[8;31;40m \e[8;31;41m \e[8;31;42m \e[8;31;43m \e[8;31;44m \e[8;31;45m \e[8;31;46m \e[8;31;47m 
\e[8;32;40m \e[8;32;41m \e[8;32;42m \e[8;32;43m \e[8;32;44m \e[8;32;45m \e[8;32;46m \e[8;32;47m 
\e[8;33;40m \e[8;33;41m \e[8;33;42m \e[8;33;43m \e[8;33;44m \e[8;33;45m \e[8;33;46m \e[8;33;47m 
\e[8;34;40m \e[8;34;41m \e[8;34;42m \e[8;34;43m \e[8;34;44m \e[8;34;45m \e[8;34;46m \e[8;34;47m 
\e[8;35;40m \e[8;35;41m \e[8;35;42m \e[8;35;43m \e[8;35;44m \e[8;35;45m \e[8;35;46m \e[8;35;47m 
\e[8;36;40m \e[8;36;41m \e[8;36;42m \e[8;36;43m \e[8;36;44m \e[8;36;45m \e[8;36;46m \e[8;36;47m 
\e[8;37;40m \e[8;37;41m \e[8;37;42m \e[8;37;43m \e[8;37;44m \e[8;37;45m \e[8;37;46m \e[8;37;47m 

Offline

#8 2025-05-11 13:05:52

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,329

Re: [SOLVED]How do i change the ls colors?

In this case you were supposed to (look at it and) actually post a screenshot.

seth also wrote:

What "theme from hubgrit"?

https://bbs.archlinux.org/viewtopic.php?id=57855
Right now the rest of us knows "I did something and it just doesn't work, i see completely different colors than what I want" and we have neither an idea of what you see not what you want.
Nor what you actually did to get there.

Offline

#9 2025-05-11 13:15:59

Irelandnokuro
Member
Registered: 2025-05-10
Posts: 8

Re: [SOLVED]How do i change the ls colors?

seth wrote:

In this case you were supposed to (look at it and) actually post a screenshot.

seth also wrote:

What "theme from hubgrit"?

https://bbs.archlinux.org/viewtopic.php?id=57855
Right now the rest of us knows "I did something and it just doesn't work, i see completely different colors than what I want" and we have neither an idea of what you see not what you want.
Nor what you actually did to get there.

I appreciate the effort and guidance, I'll try to be more specific next time, but for now i figured out how to solve it.

Offline

#10 2025-05-11 13:21:23

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 68,329

Re: [SOLVED]How do i change the ls colors?

So you had a problem, didn't describe it nor what caused it, now it's gone, likewise privvy to you.

Please report this complete waste of everyones time for the dustbin.
https://wiki.archlinux.org/title/Genera … way_street

Offline

Board footer

Powered by FluxBB