SZK Krita Pixel Art Suite

Suzuka Ka

Awesome plugin for Krita that adds lots of features for making Pixel Art!

Content

Installation

  1. Download the .zip.
  2. In Krita, go to Tools ‣ Scripts ‣ Import Python Plugin…, find the .zip file and press OK.
  3. Restart Krita.
  4. Go to Settings ➡ Dockers ➡ SZK Pixel Art Suite

A new docker with the plugin will appear:

Image
Different tabs of the docker

Tabs

Image
Tabs of the plugin
1 Color shading

2 Color replace

3 Index Painting

4 Export

5 K-Sprite

6 Options

Color Shading

This is inspired by the color shading panel from Pyxel Edit, which provided interesting color shadings very easily.

It brings its original functionality to Krita and expands on it by adding a few more options.

Image

It works by generating color variations based on a color. This base color is always at the center of a palette (except for the “mix” (mixer) palette).

Original Palettes Explained

This section is inspired by the original shading system from Pyxel Edit.

The main shading palette (on top), works by shifting the value, saturation and hue to an specific blue tone for the dark tones (on the left). For the brighter colors (on the right), works the same but shifting the colors to a brighter yellow hue.


l - Shifts (only) the value/light.


s - Shifts (only) the saturation.


h - Shifts (only) the hue.


l, s and h are very useful for fine-tuning your colors using the Middle MB (See ‘Swatches’ section)

Extra Palettes Explained

The shading palettes 2 and 3 are affected by the hues selected in the sliders above. The left slider controls the hue for the shadows, while the right slider controls the hue for the bright colors.


This offers more control for making cohesive color combinations under specific settings.

For example, lets say you are painting a sunset scene with an orange light source, and you want the shadows to gather around a pink. You can select both hues in the sliders and generate easily colors that look good in that setting.

2 uses the same algorithm as the one inspired by Pyxel Edit.

3 Uses a different algorithm (it usually gives more muddy colors for the shadows and more coloured lights).


Mixer (Mix)

Mixes 2 colors.

It uses an algorithm that checks hor similar are both colors, and reduces/adds more swatches depending how similar they are.

(The more different they are, the more steps/swatches it adds).

You can still change the resolution/number of steps by changing the slider next to the 2

Press the 1 and 2 buttons to change the colors that are mixed.

Those buttons have the following shortcuts:


ShortcutAction
Left MBTriggers the color selector
CTRL + Left MBTriggers the color picker to grab any color
ALT + Left MBPicks the Foreground color
Right MBPicks the background color

I personally find the CTRL + Left MB very useful and fast, and is the main way I use the mixer.

To generate a shading palette:

Swatches

A ‘swatch’ is a single color sample of a gradient.

Mouse Button (MB) shortcuts/actions:

ShortcutAction
Left MBPick foreground color
Right MBPick background color
Middle MBPick foreground color and rebuild the palette

I personally find Middle MB very useful for fine tuning your base color by shifting its value, hue, saturation, etc. until you got a shading that you like 👌.

When you click a swatch, the color becomes active:

Image
The white border indicates the color is selected

Once a color is selected, you can:

  • Move easily forwards/backwards in the active shading palette with a shortcuts. (See shortcuts section)

  • Add the whole shading to your active palette.

Managing Palettes

The Color Shading tab is “connected” to the native Palette docker by Krita.

How to show the Palette docker

Go to Settings -> Dockers -> Palette

Image

A docker like this will appear:


Image
Native Palette docker

Add colors to palette

When you have a gradient selected (by having selected a swatch), you can add all its colors to the active palette. For that, press this button:

Image
Adds the selected gradient to the active palette

Sort Palettes

It includes actions for adding and sorting colors in Krita’s default Palette docker by different criteria (hue, value, saturation, perceived lightness, color similarity, etc.), similar to other softwares.

This is something I personally find very useful when working with limited color palettes.

To sort your active Palette, press the button:

Image

Most are self explanatory. Even though, some ones worthy to explain:

  • Perceived lightness: This sorts the colors according how human eye perceives lightness. Is not always the same as the “value” sort.

  • Cielab similarity: Sorts the colors of your palette according by how similar they are to your active (foreground) color.

Color Replace

Allows to precisely replace an specific color in the selected layers/groups or in the entire document.

This is useful when you want to change a palette or a certain color of an entire document or layer.

The color to be replaced has to match the exact color (there is no treshold margin).

Image

1 - Color to be replaced (left) and new color (right)

Same shortcuts like in the Mixer apply here
ShortcutAction
Left MBTriggers the color selector
CTRL + Left MBTriggers the color picker to grab any color
ALT + Left MBPicks the Foreground color
Left MBPicks the background color

You don't need to remember them! Just **hover** the mouse under the colors **to see a tooltip** with these **shortcuts**:
Image
Tooltip when hovering the color buttons

2 - Swap replaced and new color.

Note: At the moment undo/redo is not supported natively in Krita’ scripts, so if you want to undo changes you can swap the colors (with the swap button) and re-execute the color replace.

3 - Alpha for the new color (in case you need to set a new one).

4 - Replaces the color in the selected layer(s).

You can select more than one layer.

5 - Replaces the color in every layer of the active document.

Index Painting

Sets up an index painting group for a layer (or group) with a single click.

Image
What is Index Painting?

Index Painting is a technique that automatically dithers and reduce colors on a non-pixel art artwork.

This means that you can use all your non-pixel art brushes in Krita , gradients, etc. for painting and still obtaining a Pixel Art aesthetic. 👌

Cool example of the aesthetic that is achievable with index painting:

If you are curious, you can learn more about this technique here.

It comes with a pattern editor that allows to create, save and load different patterns-pressets for the dithering effect:

This is mostly to play, experiment and discover new and cool pixel gradient effects.

Image
I made the sky in this piece using Index Painting

Interface

Image
  • 1 Matrix Size: Increase/decrease the rows/columns of the dither matrix.

  • 2 Rotate: Rotates the dither matrix.
    Image

  • 3 Invert: Inverts the color in the dither matrix.
    Image

  • 4 Clear the matrix: Resets all cells.

Press it twice to fill/clear all the cells.

  • 5 Dither Presets: Change the dither preset.

  • 6 Save Preset: Save your own dither preset for using it later.

  • 7 Delete Preset: Deletes the selected preset.

  • 8 Dither Matrix: Here you can paint/modify each cell of the dither matrix. Each cell represents a pixel of the dither pattern.

Image

There is some different ways for painting the matrix:

ShortcutAction
Left MB / Right MBActivate/deactivate cell (full painting)
CTRL + Left/Right MBAdds/Substracts a cell value in quantized steps.
ALT + Left/Right MBSmooth painting.

TIP: Hover a cell (or any UI element) to see its tooltip with its information.

  • 9 Create Index Painting: Press to generate an Index Painting folder for the selected layer/group.

  • 10 Repaint the dithering layer: Updates the dither pattern. Useful to call it after drawing on the matrix.

    The active layer must either be the “Dither” layer, or a sibling of the “Dither” layer.

    Note: The dither layer must be named “Dither”. This is due that after pressing the button, it searches if there is an Index Painting group set up with a dither layer.

  • 11 Create dither pattern layer: Adds a dithering layer with the dithering pattern set on the matrix

    This can be used as a pattern generator (useful for making textures for brushes, gradients, etc).

Setting an Index Painting group

Having a black and white drawing (or an empty layer if you want to draw from scratch):

Image

Note: It is preferable if the drawing already has crisp/hard edges, since Index Painting tends to generate smooth soft edges in the silhouettes (which is not desirable for Pixel Art).

Press the button Index Painting, in the Index Painting Tab:

Image

It will result in something like:

Image

It makes a group with everything needed for Index Painting.

The group consists of:

  • A Gradient Map / Index Colors filter layer, depending on your Index Painting Options

    Note: Right Click on this layer to open the Properties and edit the colors used for the shading.

  • Dither: This layer holds the dither pattern from the dither matrix.

    Note: If you are using a Gradient Map, you can change its pattern in its settings (Right Click on the layer -> Properties). Having both patterns combines them and increases the dithering effect.


    TIP: Increase/reduce its opacity to change the dithering effect.

  • Gradient (optional, depends on your Index Painting Options): It helps to visualize the effect and to sample colors.

    Having the “Gradient” layer selected, you can sample its black and white colors with CTRL+ALT+LeftMButton, and have an idea of the dither amount that value will have.

  • [Your selected layer/group] (B&W sphere in this example): This is where you have fun and paint (in black and white)!

Export Tab

Allows exporting the document (or any selected layer(s)) scaled by a factor very easily and fast.

Image
Left: Original scale. Right: Scaled

Useful when you want a higher resolution image of your Pixel Art drawing.

Image
Export tab

Image settings

  • Scale: Size multiplicator.

  • Quality: Image compression quality. The higher, the better quality (and the file size).

    Since Pixel Art normally tends to have lots of contiguous pixels with the same value, a low value usually keeps enough quality.

  • Directory: Suports both relative and absolute directories.

    • relative example: Setting a value of, lets say, Exports/Version 1 will make the exported images to be in a subdirectory relative the current path of the active document.
      • Eg: if your document is placed in C:\Users\Dexter\Desktop\my-awesome-pixel-art.kra, the exported images will be in C:\Users\Dexter\Desktop\Exports\Version 1
    • Absolute example: Setting an absolute path (like, lets say: C:\Users\Mike\Pictures\My Pixel Art) will place all exported images in that folder, and ignore the document’s path.
  • File name: Add a custom name for the exported image.

    Leaving it empty will add the document’s name.

  • Format: Select your preferred image format. (Supports .png, .jpg, .webp and .bmp)

Naming Options

  • Add scale: If true (checked), it will add the scale factor to the file name.
  • Overwrite: If false (unchecked), will add an unique time stamp for avoid overwriting files.

    This is useful if you want to manually save some “snapshots” of your drawing and don’t want to overwrite the images.

    • If true (checked) the files with the same name will be overwritten.

  • Selection only - If true/checked, it will only export the region selected. Useful if you want to export only an specific area/region.
  • 📁 - Click to open the folder with the exported images.
  • Export Scaled - Exports the whole document.
  • Export Selected - Exports only the selected layer/layers/group
    • Trim - If true/checked, the exported layers will be cropped to their bounds. If false, their size will be the document size.

      This is useful, for example, for exporting different sprites for a game easily 🎮.

K-Sprite

K-Sprite is a Pixel Art editor inside Krita that is meant to add all the Pixel Art features that are missing in Krita. Like a pixel perfect brush, or tools for propper ellipses/circles, bezier lines, pixelated text, etc.

Image
A ‘Drawing editor’ inside a ‘drawing editor’?

It’s not meant to fully replace the process of drawing Pixel Art in Krita (because Krita is still a great tool for that!). It’s meant to add all those tools that I always missed while doing Pixel Art, and to make creating Pixel Art in Krita an even more awesome experience! 🥳

Tutorial

To execute K-Sprite, go to the Pencil Tab ✏️ in the docker, or press the shortcut for Open SZK K Pixel Art Editor (SZK Pixel Art Suite) (Default Alt+F3).

A new window will appear on top of Krita 1, and will grab the active layer 2:

1 - The window will render on top always so you can still use other krita dockers/plugins while drawing in K-Sprite.

2 - The active layer will be temporarily hidden in Krita’s UI. This is due K-Sprite renders the document, and having it visible will make it impossible to see changes in case you erase parts of the active layer inside K-Sprite

You will be able to draw in the layer you had selected when you executed K-Sprite.

This layer will appear on top, while the rest of the document will be in the background:

Image
The selected layer (pink circle) appears on top when is edited in K-Sprite

Once you submit the changes, it will appear as usual in Krita, in its correct layer position.

Interface

Image
  • Active tool options: Options related the selected tool.
  • Actions: Diferent actions, like undo/redo, solo mode, etc.
  • Tool Bar: Contains all the drawing tools.
  • Canvas: This is where you draw.
  • Export Buttons: Buttons for submitting your changes to Krita.
  • Info Bar: Offers different information about the selected tool, the hovering elements, etc.

Tool Options

Tool Options

Options for the different drawing tools.

These options appear/disappear depending on the active tool.

Image
OptionShortcut
1 Pixel PerfectMakes perfect pixel lines.Q
2 Erase ModeE
3 Dither ModeUse the Index Painting matrix as a pattern when drawing.D
4 Fill ModeFill a primitive with color.ALT+F
5 X/Y MirrorM / N

Actions

Actions

Image
ButtonShortcut
1 Solo ModeDisplay only the layer that is being edited.TAB
2 Adjust document to view3
3 Delete AllClear all the content in the edited layer.(No shortcut)
4 Undo/RedoUndo and redo changes.CTRL+Z / CTRL+SHIFT+Z
Image
(1) Solo mode
Image
(3) Delete all layer content

Tools

Tools

Image
Tools
1 1px Brush

2 Antialiasing Brush

3 Lines

4 Bezier Curves

5, 6 Squares & Circles

7 Fill bucket

8 Text

9 Zoom Tool

Brush

1px brush with pixel perfect option for clean pixel art strokes. Shortcut: B

Image
Great for perfect pixel strokes
Drawing ShortcutsAction
Left MB (Mouse Button)Paint with Foreground (FG) color.
Right MBPaint with Background (BG) color.
SHIFT (Hold)Make a line between from the last point to the cursor.
CTRL+ LeftMB/RightMB (Hold)Pick FG/BG color.

Antialiasing brush

Brush for helping doing antialiasing. Shortcut: A

Image

This calculated color is a “bridge color” between the current pixel, and its surrounding neighbours, for achieving that antialiasing effect. If you don’t know about Pixel Art antialiasing, or want to know more, check this awesome article..

Lines

Tool for creating lines. Shortcut: V

About snaping

I’ve added mooooooore snapping angles for making perfect lines than what is usual in most Pixel Art editors:


Image
Left: Other Pixel Art editors’ snapping. Right: K-Sprite’s snapping

This is due I personally like to draw perspective buildings, streets, etc. and I’ve always missed that some editors do not offer more snapping angles for doing some lines more easier.

Bezier Curves

Pixel Perfect cubic and quadratic bezier curves! Shortcut: ALT+V

Image

To make a Bezier Curve:

  1. Click and drag to define start and end points on mouse click and mouse release.
  2. Place the first control point by clicking a second time.
  3. Place the second control point by clicking one last time.

For making a cubic bezier, simply click twice in the same position after adding the first control point and finish the curve.

(This is for adding the second control point in the same coordinates as the first one).

TIP: If you want the curve to still update even when the cursor is out of the editor, press (inside the editor) and drag wherever you need to make your curve.

Image
The curve continues updating when the cursor is out of the editor bounds
Reason

This is due the points are added on mouse release, and if the window loses focus without an event pending (such as holding a mouse button), the editor can’t be updated.

Squares & Circles

Tool for drawing Squares and Circles.

Shortcuts:

  • Rectangles: R
  • Circles: C
Image
Krita primitives vs K-Sprite primitives
ShortcutsAction
SHIFT (Hold)Make 1:1 Squares/Circles.
CTRLMake origin at center.
ALTMove Square/Circle.

Fill Bucket

Tool for filling closed areas. Shortcut: F

Image
Some shapes filled with the fill-bucket and the dither option!
⚠️ Warning about the fill-bucket tool

The fill-bucket uses a recursive algorithm (The flood fill algorithm), and Krita has limited the amount of recursive calls a script can execute, and this -sadly- cannot be changed.

This means that if the area to fill is big enough to reach that recursive calls limit, Krita will end that process and the fill won’t be completed and show this window:

Image

I tried some non-recursive algorithms, but they are generally way slower than the Flood Fill algorithm, so it is best to use Krita’s fill-bucket tool for filling large areas.

I considered removing the tool, but since it still does the job well for small and medium areas, I decided to keep it, since sometimes is useful 👍.

Text

Tool for drawing pixel perfect fonts! Shortcut: T

To add a text:

  • Click + Drag to create a rectangle that contains the text, or simply Left Click to create a default area.
  • Add and edit your text in the pop-up window:
Image
Text editor window
Text editor window
1 Text input for adding your text.
2 Font selector.
3 Font size.
4 Horizontal and Vertical alignment.
5 Fits the rectangle to the text (useful if you need to recalculate the area in case the text is out of bounds).
6 Crispness treshold. This is useful for adjust non
7 Color outline.
8 Outline direction. Click one to toggle it on/off.
9 Clear/Check all outline directions.

Press OK to submit the text, or Cancel to -drumroll 🥁🥁🥁- cancel/discard the text 🤯.

You can move the text while is being edited by Clicking its rectangle and dragging it:

Image
Moving the text

TIP: It also works great with non pixel art fonts! 🎉🥳 

Image

Zoom Tool

Tool for precisely zooming in on specific areas. Shortcut: Z

Image
Zoom in on specific areas with Left Click+Drag
Zoom ShortcutsAction
Left MB+(Drag)Zoom in rectangle.
Left MBZoom In.
Right MBZoom Out.

Canvas

Canvas

Here is where you draw. This area displays the current state of the document, and you will be editing the layer that was active when you launched the editor.

  • Controls
    ShortcutAction
    Left MB  Paint with Foreground Color (FG)
    Right MB  Paint with Background Color (BG)
    Middle MB or Space + Left MB (Drag)  Pan Canvas
    CTRL + Middle MB (Drag)  Zoom in/out
    CTRL + Left/Right MB  Sample Foreground/Background color
    X  Switch FG/BG Colors
    1  (Zoom) 1:1 pixel scale
    2  (Zoom) Fit minimum width/height
    3  (Zoom) Fit document into viewport

TIP: You can mask regions for painting in K-Sprite by making a selection in Krita:

Image
Selection Sync

This way, you will only be able to draw within the selection.

At the moment, there is no visual input inside K-Sprite to know if there is a selection active. You will have to look Krita’s canvas for that.

Export Buttons

Export Buttons

Image

Export the drawing/changes in K-Sprite to a New Layer or to the Active Layer in Krita

  • New layer will export the drawing to a new layer above the selected layer.
  • Active layer will export the drawing to the layer that was active when executing the editor.

👉 These buttons may show or not depending on the active layer when launching the editor.

  • Launching it with an empty layer will make not show the New Layer button (to avoid cluttering).
  • Launching it with a hidden layer selected will make not show the Active Layer button (this is to avoid committing changes to an invisible layer by mistake).

Info Bar

Info Bar

Displays information, shortcuts, tips, etc. when hovering a button/tool.

Image
Info bar, at the bottom of the editor

This is useful for not having to remember every single shortcut, tip, etc.

Options

Index Painting Options

  • Add gradient: Adds a gradient to preview the dither and to sample colors.

    Image
    Adding a gradient is useful to preview the aesthetic of the dithering pattern ✅
    • Position: Changes the position of the gradient (top, bottom, left, right).
    • Size: The size of the gradient as a percentage of the document’s size.
    • Invert: Inverts the gradient.
  • Method

    • Index colors: Uses an index color filter
    • Gradient map: Uses a gradient map filter. You can configure its dither pattern in its properties.

      I personally preffer the Gradient Map option. Since is easier to manage colors.

  • Dither live preview: When selecting a new pattern preset or editing the dither matrix (by rotating, inverting it, etc), if there is a “Dither” layer selected (or a sibling) of the selected layer, the Dither layer will be updated automatically.

    This is for being able to directly see how changes affect the shading dithering.

    Image
    Scrolling through the presets (with arrow keys) automatically updates the dithering pattern.

Shortcuts

How to configure shortcuts in Krita

Go to Settings -> Configure Krita. There, click the Keyboard Shortcuts tab.

Search for SZK Pixel Art Suite to see the available shortcuts.

Shortcuts provided by the plugin:

Palette

  • When selecting a color from a palette in the Shading tab, you can move backward/forward the active palette color with the shortcuts:
    CommandDefault Shortcut
    Previous Palette Color (SZK Pixel Art Suite)  Alt+1
    Next Palette Color (SZK Pixel Art Suite)  Alt+2

K-Sprite

  • You can execute the editor with the shortcut:
    CommandDefault Shortcut
    Open SZK K Pixel Art Editor (SZK Pixel Art Suite)  Alt+F3

I personally highly recommend to configure this to your choice. I personally like to trigger the editor as if I was changing of brush (for using one of its features, like the pixel perfect brush, or drawing a primitive, etc.)

Export Pixel Art

  • You can bind to a shortcut the action to export your pixel art with your current settings with:
    CommandDefault Shortcut
    Export Scaled Pixel Art (Full Document) (SZK Pixel Art Suite)(Not set)
    Export Scaled Pixel Art (Selected Layers) (SZK Pixel Art Suite)(Not set)

Credits

Fonts used:

Mentioned articles:


I hope it helps you to create awesome Pixel Art! 🍀


Related articles