color-picker
color-picker copied to clipboard
Color-picker doesn't replace selected text with new color
When text, specifically colors that are listed as text, is selected and then you pick a color, color-picker doesn't replace the selected text with the new color, but instead adds the new color onto the end of that text.
So, something like red
becomes redrgb(245, 111, 3)
.
I'm not sure the color-picker
should replace selected text if any is selected before opening it.
As for typed color names, these will unfortuneately not be supported.
I think it should be.
Mostly because that's what I've seen color pickers on Brackets, Codepen.io, and other web tools use. I don't know if there are examples (that I can come up with) where that hasn't been the case?
I think it should replace the selected text if the selected text was successfully parsed as a known color.
@gogoprog So the current behaviour, then?
Yes plus it would be nice to also recognize "red", "blue", etc...