The problem is occurring because the processing is creating a totally transparent image for which sparse-color is failing to find any values. The solution is to increase the -f fuzz value until it can find some opaque colors to report.