Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-101767

Incorrect hsl properties for rgb colors

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15.10, 6.2.3
    • Quick: Other
    • None
    • Android 9, Galaxy S8+, armeabi-v7a.
    • Android, Linux/X11

    Description

      QML colors made using hex triplets or with `Qt.rgba` have incorrect hsl properties.

      For example, both `#ffffff` and `Qt.rgba(1, 1, 1, 1)`, have an incorrect hue of -1 and a saturation of 0. Instead of the expected hue of 0 and saturation of 1.
      The same color constructed using `Qt.hsla(1, 1, 1, 1)` has a correct hue of 0, a saturation of 1 and a lightness of 1.
      This is shown in the provided minimal test project.

      The r, g and b properties are still correct and can be used to manually convert the color to other models.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hurlevent Oliver Eftevaag
            cloewen Colton Loewen
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes