Skip to content
/ Paletti Public

Paletti reduces an image into fewer colors to simplify it visually or to create color palettes.

License

Notifications You must be signed in to change notification settings

Eroica/Paletti

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paletti logo

Paletti

Paletti is a small tool to quantize the colors of an image. This can be used to simplify the image visually or to extract certain key colors.

The quantization process usually extracts colors that are visually close to the original image, but it is not guaranteed to be exact. It is based on a Modified median cut quantization implemented by Leptonica.

Screenshot of using Paletti

You can increase/decrease the amount of colors by scrolling up/down or using the slider (the size is currently restricted to 3 to 32 colors). The switch converts the image to grayscale.

Click on a color in the palette to copy its Hex code into the clipboard. You can also export the simplified version or a screenshot of the color palette.

A list of available shortcuts is in the Wiki area, where you can also find some stuff about Paletti’s development!

Development

Paletti is written in Kotlin using JavaFX. I also have an old GTK version (written in Vala) and a WIP Android version available in this repository. However, I mostly work as a 2D/3D artist on Windows these days, so that’s why the JavaFX version gets the most development time.

While I probably mostly use Paletti for myself, I develop it publicly in the hope that it is helpful for other people as well. You are welcome to raise bugs and feature requests here.

Paletti
├───android  ; Android version
├───docs     ; Website
├───gtk      ; GTK 4 version written in Vala
├───javafx   ; JavaFX version written in Kotlin for Windows
└───lib      ; Simple C++ wrapper used by the javafx and android version

Vala/GTK/Flatpak version

The Makefile in gtk/ creates a Paletti.flatpak image:

cd gtk
make
# Paletti.flatpak is located in dist/
# To install it locally:
flatpak install dist/Paletti.flatpak

If you just want to build Paletti locally and execute it:

# Inside gtk/
flatpak-builder --user --install build app.paletti.gtk.json --force-clean
flatpak run app.paletti.gtk

License

Please see the LICENSE file in this repository.

Paletti uses Leptonica for processing images. Leptonica’s license:

/*====================================================================*
 -  Copyright (C) 2001 Leptonica.  All rights reserved.
 -
 -  Redistribution and use in source and binary forms, with or without
 -  modification, are permitted provided that the following conditions
 -  are met:
 -  1. Redistributions of source code must retain the above copyright
 -     notice, this list of conditions and the following disclaimer.
 -  2. Redistributions in binary form must reproduce the above
 -     copyright notice, this list of conditions and the following
 -     disclaimer in the documentation and/or other materials
 -     provided with the distribution.
 -
 -  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 -  ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 -  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 -  A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL ANY
 -  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 -  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 -  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 -  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 -  OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 -  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 -  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *====================================================================*/