1. A non-transitory machine readable medium storing a program which when executed by at least one processing unit edits an image, the image comprising a plurality of pixels having pixel values in a color space, the program comprising sets of instructions for: identifying (i) a shape in a plane of two dimensions of the color space and (ii) a range in a third dimension of the color space over which the shape is propagated to form a volume in the color space, wherein pixels whose pixel values are in the volume of the color space are fully selected; displaying a deformable curve along the third dimension that represents a manner in which the shape is propagated over the range of the color space; and automatically modifying the deformable curve in order to best fit the volume around a set of sampled pixel values of the image.