Algorithm that Fills the White Holes Within the Character Image
Based on the blog post - The Paint Bucket in Paint.Net 4.0 (Video) I can tell it uses some edge detection to handle similar colors within a piece wise smooth area.
More information is given in the Paint Bucket Tool documentation.
Usually the way it can be implemented is by defining color metric. How far a color is form another color. If it within the tolerance, it is within the mask.

Morphological operation can fill small holes.
I am not sure, but it won't be too hard to implement something similar.
Probably they convert the RGB data to HSL / HSV Color Model. Then just create a mask based on the distance between the reference point to the surrounding colors.  Now the mask creates a logical (Black and White) mask to be filled.
In case of Paint.NET the algorithm should be something like Flood Fill.

So the steps are:

Convert image to the Color Model of choice (HSV / HSL or even LAB).
Generate a mask using color similarity (Distance Function) on the Color Model. The distance function is parameterized by some Threshold parameter.
Use Flood Fill like algorithm to fill the pixels in the mask using the target color. The mask is basically the stopping condition for the Flood Fill operation.

In MATLAB you have imfill() and Flood Fill.
For something more advanced you may use adaptive morphological functions like Active Contours and Morphological Snakes.