yeun / open-color

Color scheme for UI design.
https://yeun.github.io/open-color/
MIT License
5.29k stars 243 forks source link

Copying a hex value without hash is actively made hard #50

Closed kleinfreund closed 7 years ago

kleinfreund commented 7 years ago

Hey there,

when selecting any region of the hex color value, the whole value will be selected including the # symbol. Each selection attempt aiming for only parts of the hex value fails due to the selection being automatically expanded.

First of all, there are applications that require the prefixed version and applications that require an unprefixed version. Therefor I think it should be able to copy the text as usual. In my opinion the auto expansion of the selection area is a hindrance.

This becomes especially problematic when using tools like Blender that truncate the hex value to 6 characters. Copying a hex value with the hash symbol #ababab will result in #ababa being pasted. Since one is not able to copy only the hex value, it’s required to type the values by hand or copy them to a text field to manipulate. I understand that this would not be a problem if Blender would just remove the leading # on each paste attempt to the hex value field.

TL;DR: The auto-expansion of hex value selection is overly aggressive and makes things unnecessarily complicated in some cases.

Temporary Workaround: Disable JavaScript in dev tools.

yeun commented 7 years ago

I use a hex value mainly in the inspector, so it is better to enter # for me. But if you make a pr so that # does not get copied, I'll approve it.