Check out the shrink by colour examples posted by @DanielPiker
They produce curve / line outputs that would be perfect.
Shrink By Colour