rainbow icon indicating copy to clipboard operation
rainbow copied to clipboard

color transitions not smooth

Open deathtrip opened this issue 5 years ago • 8 comments

When i compare the output of rainbow to lolcat, i notice the color transitions are less smooth. If you color a wall of text using both, you notice each one color "stripes" are separated on the rainbow output.

deathtrip avatar Mar 13 '20 19:03 deathtrip

Hi, can you provide an example please?

arsham avatar Mar 14 '20 13:03 arsham

Here are some screenshots: First rainbow:

S-rainbow

now lolcat - note i'm using the rust version of lolcat here S-lolcat As you can see the color transitions are much more smooth in the second image. It may have something to do with the fact that lolcat switches the palette slower, so there's more space to present each color. But even the transitions between single shades of colors are more seamless.

deathtrip avatar Mar 16 '20 19:03 deathtrip

Sorry for the late response. Can you try playing around with these two values and let me know what combination works best for you please? Try reducing the freq value.

arsham avatar Aug 16 '20 13:08 arsham

Can you make the spread and freq values accessible through the public API, @arsham? Also, @deathtrip, did it work?

quackduck avatar Jan 12 '21 12:01 quackduck

Apparently the issue might be related to truecolor.

quackduck avatar Jan 16 '21 21:01 quackduck

@quackduck RE. accessing values is a good idea. Re. the truecolor, can you elaborate please?

arsham avatar Jan 18 '21 09:01 arsham

Some terminals support truecolor, which has more available colors to choose from. This might make the transitions smoother.

quackduck avatar Jan 18 '21 09:01 quackduck

Through my research, I find that detecting whether the terminal supports truecolor is the hard part.

quackduck avatar Jan 18 '21 10:01 quackduck