let node = figma.currentPage.selection[0] let testColor = figma.currentPage.selection[0].fills[0].color
function rgb2yuuv(c){ return { y: (c.r * 0.299) + (c.g * 0.587) + (c.b * 0.114), u: (c.r * -0.147) - (c.g * 0.289) + (c.b * 0.436), v:(c.r * 0.615) - (c.g * 0.515) - (c.b * 0.100) } function yuuDistance (c1,c2){ return Math.sqrt( ((c1.y - c2.y)**2) + ((c1.u - c2.u)**2) + ((c1.v - c2.v)**2) ) } } function yuvCloseEnough(distace){ // Change this number to adjust the similarity threshold for snapping return distance < 0.16 }
Be a part of the 300+companies using cilock
Funcionally doesn't stop at GUI level.
API driven business. Load test Virtual
Users for your API.
Perfomance isthe bottom line of your
Kearn about how to make sure your API
functions as inteded,
every time.
Worried about third party APIs,public
API or vulnerable internaal APIs?
Learn how to safely secure
them all.