VSCode / VSCodium Minimap Recovery

Repository
Drop Here, or
Input Image: Console:
Result (Click on the characters to show other possible options):
Clusters:
This tool only works for minimaps that each character contributes to 1x2 pixels of the minimap.
Normal font weight is expected.
Crop the minimap image beforehand to make sure that the top left of the image correspond to the first character at the first line and the height is a multiple of 2.

Reminders:
Sometimes (background, color1, color2) are too close to linear that a color may be wrongly classified to be in another one. Check the cluster image to fix in case that happens.
Sometimes the configuration color is too close to the background that a minimap color pair may correspond to more than 1 possible characters (especially for bracket pairs like (), [], {}, <> which intensities differ too small). Manually fix the result if that happens.
As the width of the minimap is fixed (e.g. 90), line breaks needs to be removed afterwards if long lines exist in the original source code.
Non-ascii characters can only be recovered to gibberish characters with the same code point (modulo 96).
Some components may appear in minimap that are not characters (e.g. color preview). Expect a placeholder to be manually removed.
Lines that are currently being edited, and lines with warning(s) / error(s) may have a different background color. It is recommended to separate them to another file for recovery (or to manually cover them up with the background color).
Expect gibberish characters and long running time if they are not separated.

Code created by TWY (@t-wy), all rights reserved.
License description:
To fork, use, or modify the snippets in other projects, keep the attribution (here or in apparent places) and remind others that do the same to follow so.