                  
                        // Helper to convert hex to rgba for opacity
                        const hexToRgb = (hex) => {
                            let r = 0, g = 0, b = 0;
                            if (hex.length == 4) {
                                r = "0x" + hex[1] + hex[1];
                                g = "0x" + hex[2] + hex[2];
                                b = "0x" + hex[3] + hex[3];
                            } else if (hex.length == 7) {
                     