Color correction is one of essential stages in image processing, which plays an important role during image acquisition or pre-processing to produce a better color quality, before being used in further process. This paper proposes a new method for color correction using an improved linear regression algorithm based on a stepwise model. This proposed method is designed for assessing a series of discrete color levels, for instance in a leaf color chart. Color chart as a reference image is used for controlling color levels of a captured image or calibrating the image sensor. The experiment is conducted in L∗ - a∗ - b∗ - color space, therefore a transformation from RGB into L∗ - a∗ - b∗ - is needed at the first phase. The best matched color level between reference and captured image will be selected by k-Means clustering method. Chosen color levels are used for constructing linear regression function. This function is applied as well for removing outlier among color levels. To ensure the result of this color correction does not depend on lighting condition, the color constancy algorithm is acquired. Gray World and White Patch are chosen for color constancy methods. Compared to ordinary linear regression and color correction without adding color constancy, the combination of Gray World and improved linear regression algorithm based on stepwise model shows the best result in almost entire datasets in various lighting conditions.