GithubHelp home page GithubHelp logo

mawofthevoid / pylette Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 3.0 460 KB

A palette creater written in Python

License: MIT License

Python 100.00%
palette-generation palette color-palette colorpicker

pylette's Introduction

Pylette

Have you ever had to painstakingly add colors to your palette by hand because the source image has too many colors to be imported in your Editor? The Pylette has come to save your time!

Usage

Let's take this bold picture as an example.

We can open this masterpiece in the Pylette.

After the picture is opened, the colors are shown in the Pylette where you can edit, add or delete colors. Afterwards, you can export your palette.

The resulting palette looks like this:

Now you can import the palette in your image processing program.

Why use Pylette over built-in palette functionality?

Many image editing programs allow you to import palettes from images but since they don't focus on it they have a few weaknesses. A badly scaled pixel art image has way more colors than meets the eye. The original pixel art has only these 7 colors:

But when importing a badly resized picture gets imported into pixel editor, this happens:

This many colors are suboptimal and you would have to remove most of them and this just takes time. You can simply open the image in Pylette and directly get a good palette.

But this isn't exactly the original palette and you want to edit it. First thing you could try is editing the import settings and resetting the file.

You can also delete, add or edit existing colors.

Here you also have the ability to pick a screen color which can make adding a very specific color way easier.

Installation

Windows

Just double-click the pylette.exe.

Linux

Find the Pylette file and double-click it.
If this doesn't work you have to give the pylette file executable permission.
You can do this with chmod +x /path/to/pylette. I would also recommend you to create a .desktop file so you can open it with an application icon and the ability to start it outside the directory of the executable.

MacOs

I don't have a Mac; if there is enough demand I may look into options to make an executable.

Quirks

No program is perfect and the Pylette is a program so it would be better when you know about it quirks.

  • Resetting a file not only resets the whole palette and the changed colors in the palette but does so according to the current settings as if you were deleting and adding the file.
  • When you add a file, only the current settings are important. So if you want to add multiple pictures with different settings you can do that.
  • When you import a picture with alpha channel... your palette won't have said alpha channel.
  • When you import a gif only the first frame counts.
  • If you have problems with a weird settings window; try to resize it.
  • You can change a color in the palette by clicking on the color which opens a colordialog.
  • Right-click on a color to delete it.
  • If you want to add a color from your screen you must open a colordialog and there you will find an option to pick a color from your screen.
  • That the "Custom Color" in the combobox never goes away is neither a bug nor a feature... it's less work.
  • The Pylette can only work with rgb and rgb-compatible colorspaces.
  • If your palette has a lot of colors and you can open the exported palette then try setting the scaling setting to 1 because otherwise you picture may be to big to open.

FAQ

No Users...
No Questions!

For Developers

Requirements

  • Used Python 3.7.2 but should be perfectly compatible down to 3.6. If you want to go lower, you need to replace f-strings with another syntax formatting.
  • Built with PyQt5 5.12.1; PyQt5 5.13.0 and Pyinstaller don't work well with each other.
  • Pillow 6.1.0 but newer version should work.
  • Pyinstaller 3.5 but newer versions should work.

Building executables

To create an executable you need to have pyinstaller installed.

  1. cd to the directory
  2. Run the command pyinstaller -w -i Example/pylette_256.ico main.py.
  3. Rename the main(.exe) to pylette(.exe) (optional).
  4. Copy the config.json and pylette_256.png into the folder with the executable.

Credits

Shown in the pictures

pylette's People

Contributors

mawofthevoid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.