@asd20/ui 3.2.747 → 3.2.748
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -49,10 +49,10 @@ export default {
|
|
|
49
49
|
const hexValue = cssVariable.slice(0, 7) // Remove the alpha part
|
|
50
50
|
return hexValue
|
|
51
51
|
// Check if the CSS variable value has an alpha value
|
|
52
|
-
} else if (cssVariable.startsWith('rgba
|
|
52
|
+
} else if (cssVariable.startsWith('rgba')) {
|
|
53
53
|
// Extract RGB values from RGBA color string
|
|
54
54
|
const rgbValues = cssVariable.match(/\d+/g)
|
|
55
|
-
if (rgbValues && rgbValues.length
|
|
55
|
+
if (rgbValues && rgbValues.length >= 3) {
|
|
56
56
|
return `rgb(${rgbValues[0]}, ${rgbValues[1]}, ${rgbValues[2]})`
|
|
57
57
|
}
|
|
58
58
|
}
|