Skip to content

Latest commit

 

History

History
13 lines (7 loc) · 1 KB

README.md

File metadata and controls

13 lines (7 loc) · 1 KB

GIMP Color-to-Alpha

Color to Alpha Example

This project is an interactive recreation of GIMP's color-to-alpha algorithm using Streamlit. Color to alpha is widely used for background removal and is one of GIMP's most useful photo manipulation functions.

How it Works

The algorithm measures the distance between colors in RGB space and determines if they should be transparent, opaque, or partially transparent based on their location relative to user-specified thresholds. This version of Color to Alpha adds a spherical (Euclidean) distance metric as an alternate way to determine distance between two colors. In addition, the user may also now change the interpolation of the alpha value which may help acheive more gradual or sharp feathering of edges if necessary.

Use and Learn

Feel free to use the web app on Streamlit and read more about the algorithm on Medium