Spaces:
Configuration error
Configuration error
fix: graph nodes show correct unique colors (hsl->hex conversion)
Browse files1233 unmodified lines12341235123612371238123912401257 unmodified lines249824992500250125022503250442 unmodified lines2547254825492550255125521233 unmodified linesvar hue = (h % 360 + 360) % 360;var sat = 55 + (h % 25);var lig = isDarkMode() ? 52 + (h % 16) : 38 + (h % 14);return 'hsl(' + hue + ',' + sat + '%,' + lig + '%)';}var OP_BADGES = {observe: 'badge-blue', compress: 'badge-cyan', remember: 'badge-green',1257 unmodified linesvar cpx = (s.x + t.x) / 2 + offsetX;var cpy = (s.y + t.y) / 2 + offsetY;var edgeColor = NODE_COLORS[s.type] || '#666666';var edgeAlpha;if (edgeDimmed) {edgeAlpha = 0.06;42 unmodified linesgraphSim.nodes.forEach(function(n) {if (!state.graph.filters[n.type]) return;var color = n.type === 'folder' ? folderColor(n.id) : (NODE_COLORS[n.type] || '#666666');var isHovered = hoverNodeId === n.id;var matchesSearch = !searchActive || n.name.toLowerCase().includes(graphSearchTerm);var isFocusFaded = focusNodeId && n.id !== focusNodeId && !graphSim.edges.some(function(ed) {1233 unmodified lines1234123512361237123812391240124112421243124412451246124712481257 unmodified lines250625072508250925102511251242 unmodified lines25552556255725582559256025611233 unmodified linesvar hue = (h % 360 + 360) % 360;var sat = 55 + (h % 25);var lig = isDarkMode() ? 52 + (h % 16) : 38 + (h % 14);// Return hex so parseInt(color.slice(1,3),16) works in gradient codevar s = sat / 100, l = lig / 100;var a = s * Math.min(l, 1 - l);function f(n) {var k = (n + hue / 30) % 12;var c = l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);return Math.round(255 * c).toString(16).padStart(2, '0');}return '#' + f(0) + f(8) + f(4);}var OP_BADGES = {observe: 'badge-blue', compress: 'badge-cyan', remember: 'badge-green',1257 unmodified linesvar cpx = (s.x + t.x) / 2 + offsetX;var cpy = (s.y + t.y) / 2 + offsetY;var edgeColor = s.type === 'folder' ? folderColor(s.id) : (NODE_COLORS[s.type] || '#666666');var edgeAlpha;if (edgeDimmed) {edgeAlpha = 0.06;42 unmodified linesgraphSim.nodes.forEach(function(n) {if (!state.graph.filters[n.type]) return;var color = n.type === 'folder' ? folderColor(n.id) : (NODE_COLORS[n.type] || '#666666');var isSelected = selectedId === n.id;var isHovered = hoverNodeId === n.id;var matchesSearch = !searchActive || n.name.toLowerCase().includes(graphSearchTerm);var isFocusFaded = focusNodeId && n.id !== focusNodeId && !graphSim.edges.some(function(ed) {
src/viewer/index.html+11-2