I don't know if this should be classified as a bug or feature request. It may also be wider reaching than just kate, but this is the only time I've attempted to use 4-hexdigit colors. I know in XML (and thus SVG) 4-hexdigit codes are acceptable and correctly interpreted when displayed through Firefox 135.0.1. With color picker, currently, having fill="#65D5" does not show the color picker, though it does 8 digit hex codes. If you view an SVG file with the above fill, it will be a transparent version of the normal shorthand hex color #65D. I'm not sure if this is a standard in all languages/markups so support for it might be annoying, but I did not see any mention of it so I wanted to make sure it was at least on the radar for the future. STEPS TO REPRODUCE 1. Enable color picker in kate 2. Type a 4-hexdigit code like #65D5 OBSERVED RESULT No color picker preview appears EXPECTED RESULT Color picker should show a color preview as if it were an expanded 8-hexdigit value. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 6.3.1 KDE Frameworks Version: 6.11.0 Qt Version: 6.8.2 Kernel Version: 6.13.2-arch1-1 (64-bit) Graphics Platform: Wayland
We use QColor::fromString That seems so far not to support that string format itself: https://doc.qt.io/qt-6/qcolor.html#fromString
Ah, thanks, that would make it quite difficult. I've added a suggestion request for Qt to add support for 4-digit hex codes. (In reply to Christoph Cullmann from comment #1) > We use QColor::fromString > > That seems so far not to support that string format itself: > > https://doc.qt.io/qt-6/qcolor.html#fromString