From 58041e06b7456fb2343c23abc1ff67b771cb2411 Mon Sep 17 00:00:00 2001 From: Alan Silva Date: Fri, 27 Nov 2026 19:08:41 +0000 Subject: [PATCH] Chat colours: add lime, cyan, indigo, brown and grey Thirteen colours in hue order. Each has a light and a dark shade checked by the existing contrast test; teal moves a shade deeper so it stays apart from cyan on light surfaces. Co-Authored-By: Claude Opus 5.5 --- app/lib/features/chat/domain/chat_colors.dart | 5 +++++ .../chat/ui/sessions/chat_color_palette.dart | 13 +++++++++++-- .../chat/domain/chat_session_sections_test.dart | 2 +- internal/protocol/chat.go | 2 +- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/app/lib/features/chat/domain/chat_colors.dart b/app/lib/features/chat/domain/chat_colors.dart index a453ceef..70ff0d4f 100644 --- a/app/lib/features/chat/domain/chat_colors.dart +++ b/app/lib/features/chat/domain/chat_colors.dart @@ -4,11 +4,16 @@ const chatColorNames = [ 'red', 'orange', 'amber', + 'lime', 'green', 'teal', + 'cyan', 'blue', + 'indigo', 'purple', 'pink', + 'brown', + 'grey', ]; /// The session's highlight name, or null when it has none (or one this diff --git a/app/lib/features/chat/ui/sessions/chat_color_palette.dart b/app/lib/features/chat/ui/sessions/chat_color_palette.dart index e143a09a..0afa93e1 100644 --- a/app/lib/features/chat/ui/sessions/chat_color_palette.dart +++ b/app/lib/features/chat/ui/sessions/chat_color_palette.dart @@ -13,16 +13,25 @@ Color? chatColorShade(BuildContext context, String? name) { 'red' => Colors.red, 'orange' => Colors.orange, 'amber' => Colors.amber, + 'lime' => Colors.lime, 'green' => Colors.green, 'teal' => Colors.teal, + 'cyan' => Colors.cyan, 'blue' => Colors.blue, + 'indigo' => Colors.indigo, 'purple' => Colors.purple, + 'brown' => Colors.brown, + 'grey' => Colors.blueGrey, _ => Colors.pink, }; if (dark) return swatch.shade300; return switch (name) { - 'orange' || 'amber' => swatch.shade800, - 'red' || 'teal' || 'purple' || 'pink' => swatch.shade600, + 'lime' => swatch.shade900, + // Teal leans green and cyan leans blue, so the two stay apart on light. + 'teal' || 'orange' || 'amber' => swatch.shade800, + 'cyan' => swatch.shade700, + 'red' || 'purple' || 'pink' || 'grey' => swatch.shade600, + 'indigo' || 'brown' => swatch.shade500, _ => swatch.shade700, }; } diff --git a/app/test/features/chat/domain/chat_session_sections_test.dart b/app/test/features/chat/domain/chat_session_sections_test.dart index 59d98c68..041b07bc 100644 --- a/app/test/features/chat/domain/chat_session_sections_test.dart +++ b/app/test/features/chat/domain/chat_session_sections_test.dart @@ -67,6 +67,6 @@ void main() { expect(chatSessionColor({'color': '#ff0000'}), isNull); expect(chatSessionColor({}), isNull); expect(chatSessionColor(null), isNull); - expect(chatColorNames, hasLength(8)); + expect(chatColorNames, hasLength(13)); }); } diff --git a/internal/protocol/chat.go b/internal/protocol/chat.go index 4306cda6..e992a6c2 100644 --- a/internal/protocol/chat.go +++ b/internal/protocol/chat.go @@ -444,7 +444,7 @@ type ChatExportFile struct { } // ChatColors is the fixed palette of chat highlight names, in picker order. -var ChatColors = []string{"red", "orange", "amber", "green", "teal", "blue", "purple", "pink"} +var ChatColors = []string{"red", "orange", "amber", "lime", "green", "teal", "cyan", "blue", "indigo", "purple", "pink", "brown", "grey"} // ValidChatColor reports whether name is one of ChatColors. func ValidChatColor(name string) bool {