Python Codes

Getting Adjacent Colors – Python Code

Adjacent colors are obtained by rotating 30 and 360 degrees of any given color from the color wheel. Below is the Python code to achieve the same. The input supplied is Hex value of color and output is the list of two adjacent colors (Hex value).

General Discussions · Python Codes

Complementary Colors – Python Code

Colors that are opposite to each other on the color wheel are called complementary colors. You can look out on web for more information. The function below takes a color as a input (hex-value) and returns its complementary color (hex-value).