fix: the not hex color doesn't change in toolbar #4139
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.
I found that when actively transmitting color values, only the hex color value will change along with the cursor movement on the toolbar, while other color values will remain in the default state.
I found that when getting element attributes, color values are automatically converted to RGB color values. So I did the change below
Added a function to convert existing color values in
base.ts
.Added color conversion in
toolbar.ts
to handle user arguments color.Delete color and background internal processing.
After processing, all reasonable values that can be placed on the element can be processed