100 sats \ 4 replies \ @why 30 Nov 2022 \ parent \ on: What are you working on? bitcoin
how will turbo tipping relate to the various bolt colors? Can you link an explanation of how the color coding currently works?
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
reply
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
It currently follows the rainbow through a gradient on a log 10 scale roughly, where 10000 sats tipped is the highest, ie purple.
<= 10 sats = orange
100 sats = green
1000 sats = blue
10000 sats = purple
I'm not sure how we'll have turbo tipping affect colors. Perhaps each click on turbo tipping will follow the rainbow too, regardless of your default tip. I still also need to figure out how it overlaps with press-and-hold custom tips.
Open to feedback if you have a preference.
reply