athityakumar / colorls

A Ruby gem that beautifies the terminal's ls command, with color and font-awesome icons. :tada:
MIT License
4.89k stars 387 forks source link

Dracula theme for colorls #364

Open mamyn0va opened 4 years ago

mamyn0va commented 4 years ago

Hello there,

Thanks for the great job, it makes the developer journey much more valuable !

I wanted to post my personal colorls config that is inspired by the Dracula color palette. These are not the exact same colors as colorls only have a limited colors set, but it's almost that.

Here is the my ~/.config/colorls/dark_colors.yaml:

 Main Colors
unrecognized_file: slateblue
recognized_file:   snow
dir:               magenta

# Link
dead_link: red
link:      cyan

# Access Modes
write:     cyan
read:      magenta
exec:      aqua
no_access: indianred

# Age
hour_old:    snow
day_old:     lightgray
no_modifier: dimgray

# File Size
file_large:  snow
file_medium: lightgray
file_small:  dimgray

# Random
report: white
user:   cyan
tree:   cyan
empty:  aqua
error:  red
normal: aqua

# Git
addition:     chartreuse
modification: darkkhaki
deletion:     darkred
untracked:    darkorange
unchanged:    forestgreen

Here is a screenshot:

Screen Capture_select-area_20200528124146

If you know a cleaner way to achieve the same goal, I would be happy to contribute!

Thx

avdv commented 4 years ago

Thank you for this, that looks quite nice!

Seems it's not possible to use RGB values, only color names... I'll try to come up with a fix.

bigpick commented 4 years ago

Per https://github.com/athityakumar/colorls/issues/165 I think you should be able to get away with specifying the ANSI colors where possible and it should pick them up instead. For example, for the ones if ANSI values defined already by Dracula:

# Main Colors
unrecognized_file: red
recognized_file:   white
dir:               blue

# Link
dead_link: red
link:      cyan

# Access Modes
write:     magenta
read:      blue
exec:      cyan
no_access: red

# Age
hour_old:    white
day_old:     lightgray
no_modifier: dimgray

# File Size
file_large:  white
file_medium: lightgray
file_small:  dimgray

# Random
report: white
user:   magenta
tree:   cyan
empty:  cyan
error:  red
normal: cyan

# Git
addition:     chartreuse
modification: darkkhaki
deletion:     darkred
untracked:    darkorange
unchanged:    forestgreen

And it should be using the magenta/cyan/etc defined by Dracula. I took a look at the issues for supporting Hex color codes which would be much nicer, but this works in the meantime

bigpick commented 4 years ago

Actually, I tried implementing this in that linked PR above; it accepts hex values for color if you pass them in as a quoted in the yaml file. Also continues to work with the existing X11/Ansi color names.

With that, we'd fully be able implement a Dracula 'theme' bc ❤️ (which is something I actually came here to do but realized it would be impossible without the above. So definitely would be interested in helping you out @mamyn0va if we can get that in first!)

For example, what I now use locally:

# Main Colors
unrecognized_file: '#44475a'
recognized_file:   '#F8F8F2'
dir:               '#bd93f9'

# Link
dead_link: '#ff5555'
link:      '#8be9fd'

# Access Modes
write:     '#ff79c6'
read:      '#bd93f9'
exec:      '#8be9fd'
no_access: '#ff5555'

# Age
hour_old:    '#6272a4'
day_old:     '#44475a'
no_modifier: '#f8f8f2'

# File Size
file_large:  '#ff5555'
file_medium: '#ffb86c'
file_small:  '#f1fa8c'

# Random
report: '#f1fa8c'
user:   '#8be9fd'
tree:   '#44475a'
empty:  '#6272a4'
error:  '#ff5555'
normal: '#f8f8f2'

# Git
addition:     '#8be9fd'
modification: '#f1fa8c'
deletion:     '#ff5555'
untracked:    '#ffb86c'
unchanged:    '#50fa7b'

colorls (I have aliased to colorls --dark --sd --dark)

default_ls

colorls (empty dir)

ls_empty_dir

colorls --tree (tree)

ls_tree

colorls -f (files)

ls_plain_files

colorls --git-status (with a modified file)

ls_modified_git

colorls --git-status (with a newly created/untracked file)

ls_untracked_git

file size

ls_file_size

verbose (-alrt)

ls_verbose

I actually ended up throwing up a PR to get it added to the Dracula org here.

Ghasak commented 1 year ago

does anyone knows how to change the color of the following ? Screen Shot 2022-10-08 at 0 44 27 It seems its for the the links but I also get image