cli-visualizer icon indicating copy to clipboard operation
cli-visualizer copied to clipboard

added pywal integration to README

Open aryakaul opened this issue 4 years ago • 3 comments

Hello! I love your application, and I wrote a simple tool to update colorscheme through pywal.

aryakaul avatar Nov 04 '19 12:11 aryakaul

Love it! Pywal is a great project and this seems to work. Your script is interesting and I have a couple questions about it.

This line is probably the one that stands out the most to me

# use brightness scale for later sorting (from here http://alienryderflex.com/hsp.html)
n=$(echo "sqrt(0.299*$r^2+0.114*$b^2+0.587*$g^2)" | bc -l)

From this it seems like the script is calculating a brightness score then sorting the results. I assume this is to create a better gradient from high to low, but please let me know if that is incorrect. I like this idea a lot, do you think it is worth porting to the code directly? The configuration would be option colors.sort=(none|brightness_desc|brightness_asc). It might make it easier for people not using pywal, and even the pywal I think would just be a template.

dpayne avatar Nov 05 '19 18:11 dpayne

Yep, you're right the idea is to help make a more pleasing gradient.

I think the idea is worth porting to the code, and should be relatively simple to implement. I'd be happy to help add this feature if you can point me in the right direction with the vis codebase!

aryakaul avatar Nov 06 '19 01:11 aryakaul

It would make the most sense to add a function call right after reading the list of colors that then sorts the vector. Here is the line the reads the colors https://github.com/dpayne/cli-visualizer/blob/master/src/Utils/ConfigurationUtils.cpp#L350.

dpayne avatar Nov 06 '19 17:11 dpayne