update alpha handling

This commit is contained in:
Matt Wiebe 2023-08-11 14:33:51 -05:00
parent 767ceb525e
commit a2926f7bb4

View file

@ -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)