pull down to refresh

Seems like this is the function: https://github.com/stackernews/stacker.news/blob/master/components/upvote.js#L15 and here are the colors defined: https://github.com/stackernews/stacker.news/blob/master/lib/rainbow.js

But I don't get what this var(--secondary) is.

Also, I am surprised that it seems that the color changes for every tip? I thought there are threshold where it flips to the next color. But doesn't seem to be the case:

$ python
Python 3.10.8 (main, Nov  1 2022, 14:18:21) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import math
>>> math.floor(math.log(1) / math.log(10000) * 734)
0
>>> math.floor(math.log(11) / math.log(10000) * 734)
191
>>> math.floor(math.log(12) / math.log(10000) * 734)
198
>>> math.floor(math.log(13) / math.log(10000) * 734)
204
>>> math.floor(math.log(14) / math.log(10000) * 734)
210
I am surprised that it seems that the color changes for every tip

It's a gradient so it's a pretty subtle change.

But I don't get what this var(--secondary) is.

It's the css variable for bitcoin orange.

reply

Ah, I used 1 as my default tip now and could see the subtle gradient change now :) Cool, thanks!

reply