From 43f8f5e6cd0db0ad9265addf3a0ad98b8e4b8b6b Mon Sep 17 00:00:00 2001 From: Lucie Bader <167515375+Lucie-Bdr@users.noreply.github.com> Date: Sun, 23 Feb 2025 19:23:57 +0100 Subject: [PATCH] Suppression fonction inutile dans lexicon_icon.js --- src/assets/lexicon_icon.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/assets/lexicon_icon.js b/src/assets/lexicon_icon.js index fa5852f..d3bec91 100644 --- a/src/assets/lexicon_icon.js +++ b/src/assets/lexicon_icon.js @@ -110,20 +110,6 @@ async function getColorForLexicon(lexiconId) { return (lexiconColors && lexiconColors[String(lexiconId)]) || "#cccccc"; } -/** - * Convertit une couleur hexadécimale en une couleur RGBA. - * @param {string} hex - La couleur en hexadécimal. - * @param {number} opacity - La transparence (0-1). - * @returns {string} La couleur RGBA. - */ -function hexToRgba(hex, opacity) { - const bigint = parseInt(hex.replace('#', ''), 16); - const r = (bigint >> 16) & 255; - const g = (bigint >> 8) & 255; - const b = bigint & 255; - return `rgba(${r}, ${g}, ${b}, ${opacity})`; -} - // Expose les fonctions globalement window.updateLexiconColors = updateLexiconColors; window.getColorForLexicon = getColorForLexicon; @@ -131,4 +117,3 @@ window.convertColor = convertColor; window.getOrCreateLexiconColor = getOrCreateLexiconColor; window.createColorCircle = createColorCircle; window.getLexiconsColors = getLexiconsColors; -window.hexToRgba = hexToRgba; -- GitLab