Is it possible to limit the color range?
I really like this prompt so much that I've put it on more shells than I should have 😅 Since the prompts look so similar, sometimes I forget which computer I'm using, even though it's right in the prompt, and in the terminal window's title 😛 Instead, I thought it might be nice if I could make one shell bluish, another orangish, etc... Is there perhaps a way to limit the range of colors it will use? e.g. just use colors in the green-yellow-orange range and leave out the rest, the reds, purples, blues basically? Perhaps I could make some minor changes to https://github.com/dosentmatter/lolcat/blob/master/lolcat.c? Thanks
Thanks for using the prompt!
It doesn't look like lolcat.c supports limiting colors. My lolcat.c is pretty behind the upstream repo. You would have to submit changes to my fork or fork https://github.com/jaseg/lolcat on your own.
lolcat.c has a list of ANSI color codes that it randomly indexes:
https://github.com/dosentmatter/lolcat/blob/master/lolcat.c#L52
You can see the colors here: https://www.lihaoyi.com/post/BuildyourownCommandLinewithANSIescapecodes.html#256-colors
You can modify the code to accept options for different sets of colors with corresponding array of ANSI color codes to index from.
Cool thanks. Yes I see... well for now I just used the numbers from Haoyi's color table and put the one's I wanted to use in your lolcat.c's codes[] array.