How do I extract a percentage of white pixels to dark pixels within the bounds of a feature class?

I have an image below that I have applied a threshold to. Along a traverse line I have several points I have created a buffer around, and now I want to run an analysis that extracts the percentage of white to dark and display it as a decimal in the attribute table line for each square.

except you will have to code/model an iteration for each polygon since your polygons overlap.

If the zone feature input has overlapping polygons, the zonal analysis will not be performed for each individual polygon. Since the feature input is converted to a raster, each location can only have one value.

An alternative method is to process the zonal statistics iteratively for each of the polygon zones and collate the results.

except you will have to code/model an iteration for each polygon since your polygons overlap.

If the zone feature input has overlapping polygons, the zonal analysis will not be performed for each individual polygon. Since the feature input is converted to a raster, each location can only have one value.

An alternative method is to process the zonal statistics iteratively for each of the polygon zones and collate the results.

Oh man! This works perfectly!... well almost... I only have one aspect that doesn't work. The old toolset you linked is incredible and is what I need, but.... it calculates the total number of pixels in the box (good), and the variety of pixel values in the box (good), but never says how many of each I have. It seems easy enough to add. Perhaps incorporating the zonal histogram tool?

I just don't know how to add that to the toolbox file or the python command