(not sure this should be considered as a bug or an ux issue)
Hi,
When manipulating colors hex on your computer, you often copy-paste hex values with a leading #
from your clipboard.
When pasting, for example, #1a2331
into a color text input, there is a minor issue:
First, the last character from your string #1a2331
is removed since the input is limited to six characters and #1a2331
has seven because of the #
.
And after that, the #
is automatically stripped from the string.
So the final value in your input after you paste it becomes: 1a233
with the missing last character 1
, resulting in wrong color value.
A solution to fix this could be that the #
should be removed before the number of characters from your string is checked.
To reproduce the issue, paste the string #1a2331
in any color text input from your Discourse color theme customization.
I’m on Windows 10 with Chrome and I’m using Discourse 2.4.0.beta7.