feat: Add hexadecimal color input to color picker (fixes #3381)#3454
Open
majiayu000 wants to merge 2 commits intocode-charity:masterfrom
Open
feat: Add hexadecimal color input to color picker (fixes #3381)#3454majiayu000 wants to merge 2 commits intocode-charity:masterfrom
majiayu000 wants to merge 2 commits intocode-charity:masterfrom
Conversation
…#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 <noreply@anthropic.com>
Member
|
thanks @majiayu000 tested? |
Update hex input field in real-time when user drags on the color palette, matching the existing behavior of the hue slider. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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
satus.color.rgbToHex()function for RGB to hex conversionsatus.color.hexToRgb()function for hex to RGB conversion#RRGGBB) and shorthand (#RGB) notationFeatures
#RRGGBBand#RGBshorthand formatsTest plan
#FF5500) and verify the palette updates#F50) works correctlynpm test)Fixes #3381