From 55723519aa0087522ea7294318ab801da98d3ed1 Mon Sep 17 00:00:00 2001 From: liuwei Date: Mon, 27 Apr 2026 10:05:06 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=85=B3=E7=B3=BB=E5=9B=BE?= =?UTF-8?q?=E5=A4=96=E6=A1=86=E5=B1=82=E7=BA=A7=E9=85=8D=E8=89=B2=E5=B9=B6?= =?UTF-8?q?=E7=A7=BB=E9=99=A4=E5=8F=91=E5=85=89=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/value_rank/main.py | 48 +++++++++---------- .../value_rank/templates/social_graph.html | 35 -------------- 2 files changed, 23 insertions(+), 60 deletions(-) diff --git a/plugins/value_rank/main.py b/plugins/value_rank/main.py index d26e6ab..9ce3e8b 100644 --- a/plugins/value_rank/main.py +++ b/plugins/value_rank/main.py @@ -1511,9 +1511,7 @@ class ValueRankPlugin(MessagePluginInterface): bx, by = pos_map[b] normalized = max(0.12, min(score / max_edge_score, 1.0)) stroke_width = 1.35 + 6.5 * normalized - glow_width = stroke_width + 3.6 opacity = 0.20 + 0.48 * normalized - glow_opacity = 0.10 + 0.22 * normalized edge_gradient_id = f"edge_gradient_{edge_idx}" start_color = "#50D6FF" end_color = "#FFBB5C" if (a == strongest_uid or b == strongest_uid) else "#6C92FF" @@ -1524,11 +1522,6 @@ class ValueRankPlugin(MessagePluginInterface): f'' f'' ) - edge_svg_parts.append( - f'' - ) edge_svg_parts.append( f'' f'' + f'rx="7" ry="7" fill="rgba(16,38,74,0.68)" stroke="rgba(84,214,255,0.34)" stroke-width="1.0">' f'{safe_label}' f'' ) @@ -1585,14 +1577,22 @@ class ValueRankPlugin(MessagePluginInterface): avatar_url = _build_avatar_data_url(str(cm.get_head_image(uid) or "").strip(), uid) ring_idx = int(node_meta_map.get(uid, {}).get("ring_idx", 0)) - # 使用“连接度越高环线越偏暖”的视觉策略,帮助快速识别核心节点。 - ring_color = "rgba(255, 176, 58, 0.96)" if size_norm >= 0.6 else "rgba(74, 141, 255, 0.96)" - glow_color = "rgba(255, 205, 111, 0.30)" if size_norm >= 0.6 else "rgba(84, 214, 255, 0.26)" - orbit_color = "rgba(255, 211, 130, 0.74)" if size_norm >= 0.6 else "rgba(113, 228, 255, 0.72)" - node_svg_parts.append( - f'' - ) + # 外框颜色按层级区分,而不是统一蓝金: + # 1. 核心层用暖金色,强调中心; + # 2. 第二层用青蓝色,形成科技感主色; + # 3. 外围层逐步过渡到蓝紫与浅蓝,方便一眼识别层次。 + if ring_idx == 0: + ring_color = "rgba(255, 176, 58, 0.98)" + orbit_color = "rgba(255, 211, 130, 0.80)" + elif ring_idx == 1: + ring_color = "rgba(69, 212, 255, 0.96)" + orbit_color = "rgba(128, 238, 255, 0.72)" + elif ring_idx == 2: + ring_color = "rgba(93, 142, 255, 0.94)" + orbit_color = "rgba(148, 181, 255, 0.66)" + else: + ring_color = "rgba(145, 150, 255, 0.90)" + orbit_color = "rgba(188, 192, 255, 0.60)" node_svg_parts.append( f'' @@ -1643,7 +1643,7 @@ class ValueRankPlugin(MessagePluginInterface): ] crown_points_text = " ".join([f"{px:.1f},{py:.1f}" for px, py in crown_points]) node_svg_parts.append( - f'' + f'' f'' f'' + f'rx="10" ry="10" fill="rgba(17, 41, 79, 0.84)" stroke="{ring_color}" stroke-width="1.6">' ) node_svg_parts.append( f'' + f'rx="12" ry="12" fill="rgba(14, 33, 66, 0.66)" stroke="rgba(84,214,255,0.24)" stroke-width="1.0">' ) node_svg_parts.append( f' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - __EDGE_DEFS__ __NODE_DEFS__