From a2926f7bb4156b5cd78334636ca36bb653b8cbe9 Mon Sep 17 00:00:00 2001 From: Matt Wiebe Date: Fri, 11 Aug 2023 14:33:51 -0500 Subject: [PATCH] update alpha handling --- src/follow-me/button-style.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/follow-me/button-style.js b/src/follow-me/button-style.js index 0b8325f..df137f7 100644 --- a/src/follow-me/button-style.js +++ b/src/follow-me/button-style.js @@ -14,7 +14,8 @@ function getBackgroundColor( color ) { function getLinkColor( text ) { // if it starts with a hash, leave it be if ( typeof text === 'string' && text.match( /^#/ ) ) { - return text; + // we don't handle the alpha channel if present. + return text.substring( 0, 7 ); } // var:preset|color|luminous-vivid-amber // var(--wp--preset--color--luminous-vivid-amber)