[Github-comments] [geany/geany-plugins] chooser opens not only for color hexstrings (Issue #1166)

nick87720z notifications at xxxxx
Thu Mar 3 13:50:42 UTC 2022


When color chooser by double click is enabled, it opens not only for valid color hex strings like `#FFFFFF` or `#FFF`, but for anything, that ends with 3 or 6 hex digits (doesn't reproduce if they are in the middle or start).

It could be described by following grep's extended regex:
``` grep
(#|0x|\x|[^0-9a-zA-Z])([0-9A-Fa-f]{3}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8}|[0-9A-Fa-f]{12}|[0-9A-Fa-f]{16}|[0-9A-Fa-f]{24}|[0-9A-Fa-f]{32})[^0-9a-zA-Z]
```

Although I'm not so sure about 8 xdigits per channel, having it supported by editor plugin should not be a burden; at least 4 digits per channel are covered by gtk3 editor, and I guess 8 digits would be also all covered by GdkRGBA color format (assuming it's used by this plugin instead of GdkColor). Of course, if other recognition way is used than regexp, than it could be just 2^n digits per channel for any positive n.

May be good if it tried to maintain existing precision or it would easily upgrade 1 digit per channel to all 8. :)

For alpha channel - I'm not sure, is there way to decide if it goes first or last (perhaps - either do it last by default or add option to change order).

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/1166
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany-plugins/issues/1166 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20220303/30e503fd/attachment.htm>


More information about the Github-comments mailing list