Created
June 11, 2023 06:28
-
-
Save ceane/6a413a6f0b6b9cb3ab2ce077cb4003de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let REDS = 220 | |
let SHIFT = 8 | |
let heatmap = (i, of_) => Math.floor( | |
REDS * Math.sin(i / of_) | |
) + SHIFT + i | |
let backgroundColor = (item, items) => | |
`rgb(233, ${heatmap(item, items > 6 ? items : 6)}, 33` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment