Spaces:
Configuration error
Configuration error
fix: graph nodes show correct unique colors (hsl->hex conversion)
Browse files1233 unmodified lines12341235123612371237123812391240124112421243124412451246124712481257 unmodified lines2506250725082501250925102511251242 unmodified lines25552556255725582559256025611233 unmodified lines var hue = (h % 360 + 360) % 360;
var sat = 55 + (h % 25);
var lig = isDarkMode() ? 52 + (h % 16) : 38 + (h % 14);
return 'hsl(' + hue + ',' + sat + '%,' + lig + '%)';
// Return hex so parseInt(color.slice(1,3),16) works in gradient code
var 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 lines var cpx = (s.x + t.x) / 2 + offsetX;
var cpy = (s.y + t.y) / 2 + offsetY;
var edgeColor = NODE_COLORS[s.type] || '#666666';
var edgeColor = s.type === 'folder' ? folderColor(s.id) : (NODE_COLORS[s.type] || '#666666');
var edgeAlpha;
if (edgeDimmed) {
edgeAlpha = 0.06;42 unmodified lines graphSim.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