From 95b01c2686415ba97467dabc60964696bb55c5a8 Mon Sep 17 00:00:00 2001 From: majiayu000 <1835304752@qq.com> Date: Sun, 14 Dec 2025 14:57:52 +0800 Subject: [PATCH 1/2] feat: Add hexadecimal color input to color picker (fixes #3381) Add a hexadecimal input field to the color picker component, allowing users to input colors using hex notation (e.g., #FF5500) in addition to the visual palette. Changes: - Add satus.color.rgbToHex() function for RGB to hex conversion - Add satus.color.hexToRgb() function for hex to RGB conversion - Supports both full (#RRGGBB) and shorthand (#RGB) notation - Add hexadecimal input field to color picker modal - Input syncs with palette, hue slider, and color preview - Palette and hue slider update hex input when changed - Add CSS styles for hex input container, label, and input field - Add unit tests for color conversion and UI components The hex input provides a more precise way for users to input specific colors, especially when copying colors from design tools or websites. Co-Authored-By: Claude Opus 4.5 --- menu/satus.css | 37 ++++++++++ menu/satus.js | 112 +++++++++++++++++++++++++++++ tests/unit/hex-color-input.test.js | 110 ++++++++++++++++++++++++++++ 3 files changed, 259 insertions(+) create mode 100644 tests/unit/hex-color-input.test.js diff --git a/menu/satus.css b/menu/satus.css index afbb3eddf..a8b59b35f 100644 --- a/menu/satus.css +++ b/menu/satus.css @@ -1159,6 +1159,43 @@ As our Syntax markup isnt read for