Script to round like-colors

hi, anyone have a script that can round like-colors?
sometimes in process I like to grab full res pictures and downsize them for pixel art. I then draw over them, but it would be cool to have a script automatically round colors (that are antialiased) to their nearest to then help you know where you need to add contour etc…

obviously you will have detail issues since pixel art is different resolution, but its a place to start with things.

hi, it seems like you need some sort of posterization. there’s no direct function for that and i’m not aware of the script to do so, but there are several workarounds:

  1. replace colour function. you can find it under the edit menu. it has tolerance slider, the large values will replace more similar colours all at once.
    the only issue is that you’d have to do it manually for each level/colour step. so, if you want for example image with 8 colours, you’d have to do this 8 times.
    (there is a script to replace multiple colours at once, but it doesn’t have tolerance slider)

  2. convert rgb image to indexed colour and let aseprite do the posterization automatically. you’d have to prepare the palette for that of course. all you have to do is select colours you need and add them to palette by clicking on “!” next to colour. after you have the colours you need in a palette, delete all other colours and add one colour to the beginning of the palette to serve as a transparent colour. then go to sprite → color mode and choose either indexed or more options if you want to use dithering. after that you can convert the sprite back to rgb.
    this is considerably faster, but your control over the process is a bit limited. which means you may have to undo the action, change the palette, adjust image using curve and/or brightness/contrast and repeat the conversion. until you get a satisfactory result.

  3. use curve adjustment. go to the edit → adjustments menu and select color curve. scale the window up and add draw and move points in the way you will end up with staircase. each step of it is one level step, so make sure everything is as flat as possible.
    the advantage of this method is that you are doing posterization in one step and also you can see the preview how it looks, so you have the most control.
    the colours will look ugly, however after you click on ok, you can then go to palette menu, create new palette from sprite, convert the image to indexed colour and change colours as you wish.
    the only little problem is that you may end up with more colours than needed. in that case you can either use replace colour in rgb mode or just delete colours you don’t like from palette and convert the image to indexed again.

thank you olga! I will try out these methods. I like the #3 the most, but I will have to test it.

1 Like