Templates are random colors now :0
Dalton Edwards
Author
I copied a JS snippet. I input the BG as a parameter and it returns #fff or #000 which I apply to text color
How do you change the label text for each card? Do you do it dynamically based on Hue value? I was just trying to figure out how to do this for my project but couldn't figure out a solution.
Dalton Edwards
Author
function getColorByBgColor(bgColor) { if (!bgColor) { return ''; } return (parseInt(bgColor.replace('#', ''), 16) > 0xffffff / 2) ? '#000000' : '#ffffff'; }
Please sign in to leave a comment.