Convert RGB to Hex Color using Python

% operator

r = 128
g = 96
b = 194
hexColor = '#%02x%02x%02x' % (r, g, b)

print(hexColor)

Leave a Comment

Cancel reply

Your email address will not be published.