The color of skin lesions is a crucial diagnostic feature for identifying malignant melanoma and other skin diseases. Typical colors associated with melanocytic lesions include tan, brown, black, red, white, and blue-gray. This study introduces a novel feature: the number of colors present in lesions, which can indicate the severity of skin diseases and help distinguish melanomas from benign lesions. We propose a color histogram analysis, a traditional image processing technique, to analyze the pixels of skin lesions from three publicly available datasets: PH2, ISIC2016, and Med-Node, which include dermoscopic and non-dermoscopic images. While the PH2 dataset contains ground truth about skin lesion colors, the ISIC2016 and Med-Node datasets lack such annotations; our algorithm establishes this ground truth using the color histogram analysis based on the PH2 dataset. We then design and train a 19-layer Convolutional Neural Network (CNN) with different skip connections of residual blocks to classify lesions into three categories based on the number of colors present. The DeepDream algorithm is utilized to visualize the learned features of different layers, and multiple configurations of the proposed CNN are tested, achieving the highest weighted F1-score of 75.00 % on the test set. LIME is subsequently applied to identify the most important features influencing the model's decision-making. The findings demonstrate that the number of colors in lesions is a significant feature for describing skin conditions. The proposed CNN, particularly with three skip connections, shows strong potential for clinical application in diagnosing melanoma, supporting its use alongside traditional diagnostic methods.