Skip to content

Adds colored sliders to HSV adjustment filter

What it does

Improves the QSliders in the HSV adjustment filter widget with colored sliders.

Hue slider scrolls as you click in relative mode, other sliders do not change color, serving as an aesthetic indicator only.

(before this change)

Reasons to make this change

  1. The QSlider is hard to click - Clicking on the QSlider only moves by one step, instead of moving directly to the position
  2. Having a visual indicator of the color is extremely helpful for the Colorize mode.
  3. Even when not using the colorized mode, having a visual indication of where the hue can shift, as well as the saturation and values is useful. If the color in the image is green and you want to shift it to blue, then having the color slider show you that blue is right of green means you can just move it directly to the right and you won’t need to guess.
  4. The colors on the sliders do not change when using the relative mode (a la Photoshop), and serves as an aesthetic visual indicator
  5. Improves existing code in KisHsvColorAdjustmentWidget, makes it easy to implement additional color pickers for HSX
  6. Community feedback is fairly positive, despite the initial misunderstanding.
  7. More familiar UI for PhotoShop users


Depends on changes made in !1436 (merged)


  1. Commit 1: Refactors KisHsvColorAdjustmentWidget - improves code quality, UI layout
  2. Commit 2: Adds support for negative minimum values to KisHsvColorSlider
  3. Commit 3: Adds HSX mixing modes to KisHsvColorSlider
  4. Commit 4: Updates KisHsvAdjustmentWidget to use colored sliders
  5. Commit 5: Simplifies code in KisHsvColorInput
  6. Commit 6: Scrolls the Hue bar when clicked in relative mode
  7. Commit 7: Fixes the Saturation mixing as identified by emmet

Test Plan

  1. Open a new file

  2. Open Filters -> Adjust HSV (Ctrl-U)

  3. Verify that the sliders have been replaced with colored sliders

  4. Stretch the UI to ensure it reflows correctly

  5. For each mode in

    1. Hue/Saturation/Value (HSV)
    2. Hue/Saturation/Lightness (HSL)
    3. Hue/Saturation/Intensity (HSI)
    4. Hue/Saturation/Luma (HSY')
    5. Blue Chroma/Red Chroma/Luma (CrCbY)
    • Test the three sliders through their full range of motion For HSV/HSL/HSI/HSY': ±180, ±100, ±100

      For CrCbY: ±100, ±100, ±100

    • Ticking colorise should auto-rescale the values.

      For HSV/HSL/HSI/HSY': 0-360, 0-100, -100-100

      For CrCbY: 0-100, 0-100, -100-100

  6. Applying each filter should result in the correct transformation

  7. Applying and editing each HSV adjustment filter mask should also display the new UI

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by Sam Linnfer

Merge request reports