Skip to content

Draft: Add "playful palette" docker

Deif Lou requested to merge deiflou/krita:deiflou/playful_palette into master

This adds a new color chooser docker that is based on this paper (see presentation video here).

The playful palette allows to set a number of color blobs of different radii that are then interpolated, kind of simulating the traditional mixing of color on a palette. A new color can then be picked from the palette to paint with it.

screenshot

Here is a video of the docker in action: https://www.youtube.com/watch?v=v8K-fLGvEIc

There is also a commit that tries to improve the look of the KoGroupButton. Makes the background more consistent with normal buttons and draws better separators by using less custom code. Also add a tweak to KisHighlightedToolButton to better handle the disabled state.

To interact with the docker follow these instructions:

  • Select between "color sampling" and "edit palette" modes with the bottom-left buttons.
  • When in "color sampling" mode, sample a color and use it as foreground color by pressing and optionally dragging the left mouse button. To use the color as background color, do the same but with the right mouse button.
  • When in "edit palette" mode:
    • Left-click on the background to create a new blob.
    • Left-press on the background and drag the mouse to pan the view on the palette.
    • Left-click on a blob to select it.
    • Right-click on a blob to delete it.
    • Double-click on a blob to change its color.
    • Left-press and drag on the contour of a blob to change its radius.
    • Left-press and drag on the interior of a blob to change its position.
    • If the center of the palette ends up outside the view then a button appears on the toolbar that allows to reset the center of the palette to the center of the view.
    • If some blobs end up outside the view, those are indicated on the borders of the view with tiny color circles.
    • When a blob is selected two buttons appear on the toolbar, one to remove the selected blob and another to change the color of the selected blob.
    • There is a button on the right of the toolbar to show some palette options:
      • "Sliminess" (better name welcomed): controls how sticky/viscous (?) the blobs are or how much the blobs spread beyond their radius.
      • "Block size": controls how pixelated the palette looks, to kind of quantize it.
      • Checkerboard background colors: the palette can use the global colors set on the settings or some custom ones.

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.

Reminder: the reviewer is responsible for merging the patch, this is to ensure at the least two people can build the patch. In case a patch breaks the build, both the author and the reviewer should be contacted to fix the build. If this is not possible, the commits shall be reverted, and a notification with the reasoning and any relevant logs shall be sent to the mailing list, kimageshop@kde.org.

Edited by Deif Lou

Merge request reports

Loading