Skip to content
Snippets Groups Projects
Commit 43f8f5e6 authored by Lucie Bader's avatar Lucie Bader
Browse files

Suppression fonction inutile dans lexicon_icon.js

parent 04b3fe53
No related branches found
No related tags found
No related merge requests found
......@@ -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;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment