<% const data = customThemeOptions.graph; let currentScheme = themeConfig.colorScheme; let colone; let coltwo; let gradone; let gradtwo; function hexToRgba(hex, alpha) { var r = parseInt(hex.substring(1,3), 16); var g = parseInt(hex.substring(3,5), 16); var b = parseInt(hex.substring(5,7), 16); return 'rgba(' + r + ', ' + g + ', ' + b + ', ' + alpha + ')'; } if (currentScheme == "blue") { colone = "#21d4fd"; coltwo = "#2152ff"; gradone = "rgba(33,212,253,0.1)"; gradtwo = "rgba(33,82,255,0.1)"; } if (currentScheme == "pink") { colone = "#FF0080"; coltwo = "#7928CA"; gradone = "rgba(255,0,128,0.1)"; gradtwo = "rgba(121,40,202,0.1)"; } if (currentScheme == "red") { colone = "#ea0606"; coltwo = "#ff667c"; gradone = "rgba(255,102,124,0.1)"; gradtwo = "rgba(234,6,6,0.1)"; } if (currentScheme == "green") { colone = "#17ad37"; coltwo = "#98ec2d"; gradone = "rgba(23,173,55,0.1)"; gradtwo = "rgba(152,236,45,0.1)"; } if (currentScheme == "yellow") { colone = "#f53939"; coltwo = "#fbcf33"; gradone = "rgba(245,57,57,0.1)"; gradtwo = "rgba(251,207,51,0.1)"; } if (currentScheme == "dark") { colone = "#141727"; coltwo = "#3A416F"; gradone = "rgba(20,23,39,0.1)"; gradtwo = "rgba(58,65,111,0.1)"; } if (currentScheme == "custom") { if (!themeConfig.themeColors || !themeConfig.themeColors.primaryColor || !themeConfig.themeColors.secondaryColor) { currentCode = "310deg, #7928CA 0%, #FF0080 100%"; colone = "#FF0080"; coltwo = "#7928CA"; gradone = "rgba(255,0,128,0.1)"; gradtwo = "rgba(121,40,202,0.1)"; } else { currentCode = "310deg, " + themeConfig.themeColors.primaryColor + " 0%, " + themeConfig.themeColors.secondaryColor + " 100%"; colone = themeConfig.themeColors.primaryColor; coltwo = themeConfig.themeColors.secondaryColor; gradone = hexToRgba(themeConfig.themeColors.primaryColor, 0.1); gradtwo = hexToRgba(themeConfig.themeColors.secondaryColor, 0.1); } } %>