Skin cancer diagnosis forms a critical aspect of medical research, with notable improvements being driven by artificial intelligence (AI), particularly deep learning. This study is focused on a specific, crucial challenge: enhancing the diagnostic accuracy of skin cancer by leveraging the color information inherent in skin lesions. To meet this aim, an innovative method combining convolutional neural networks and deep learning-based image processing techniques was developed. The proposed methodology exploits various color spaces, including RGB, Lab, HSV, and YUV, to meticulously analyze skin lesion color characteristics. A comprehensive exploration of numerous color space combinations revealed the superior performance of the YUV-RGB blend. An impressive accuracy of 98.51% was attained in the detection and classification of different types of skin cancer using this combination, surpassing conventional diagnostic approaches in both speed and precision. These significant findings pave the way for early skin cancer detection, dramatically enhancing treatment possibilities and patient recovery prospects. This study, therefore, provides a substantial contribution to the domain of skin cancer diagnosis by fully harnessing the potential of AI and deep learning.