A TypeScript implementation of flood-fill that supports setting custom alpha values for the replacement color.
Click here to try it out!
-
Open the web page.
-
Upload an image.
-
Choose your replacement color.
-
Choose your tolerance.
- Tolerance is defined as the Euclidean distance threshold under which the algorithm will continue filling.
- Tolerance defaults to
0
, meaning the algorithm will only continue filling the adjacent pixels that exactly match the target color.
-
Click to flood-fill.
If you Google "online fill bucket", you can find a plethora of existing flood-fill tools. However, I have yet to see one that allows you to configure the alpha value of the replacement color. This is problematic, as my primary use case for flood-fill is to remove opaque backgrounds.
MIT
Copyright (c) 2019 Kyle Lin