Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
6.7.1, 6.7.2
-
aac4168a7 (dev), 509ef252a (6.8)
Description
A reproducer attached.
Issue:
A color information (Qcolor Class / color QML value type) cannot be fully copied via HSL values.
For example, this code snippet shows that the color B and C have different color information even color B is initialized based on color C.
var C = "#bbbbbb"
var B = Qt.hsla(C.hslHue, C.hslSaturation, C.hslLightness)
console.log(C, C.hslHue, C.hslSaturation, C.hslLightness)
console.log(B, B.hslHue, B.hslSaturation, B.hslLightness)
And the result is :
#bbbbbb -1 0 0.7333333492279053
#bbbbbb 0 0 0.7333333492279053
The document "QColor Class - The HSV Color Model" (https://doc.qt.io/qt-6/qcolor.html#the-hsv-color-model ) says "Qt returns a hue value of -1 for achromatic colors.", but this specification seems causing this loss of information mentioned above.