Skin cancer is the most commonly diagnosed type of cancer in people, regardless of age, gender, or race. One of the most common malignant skin cancers is melanoma, which is a dangerous proliferation of melanocytes. It is a well-known fact that early diagnosis of skin cancer is crucial and allows for successful treatment. Treatment of melanoma is not effective when melanoma is at an advanced stage. A widely used tool for the examination of skin lesions is a dermatoscope, which uses optic magnification to visualize features that are invisible to the naked eye. For a precise and objective diagnosis, there is a need for a computerized method for the removal and inpainting of hairs in image processing. In this study, we present an algorithm for the detection and inpainting of hairs in color dermoscopic images.