While dealing with color operations we would need to work with RGB and Hex values and need conversation between formats for the operations. Here are the python code snippets to achieve the same.
1. Converting RGB to HEX
# Module to convert rgb to hex
def rgb_to_hex(rgb):
return '#%02X%02X%02X' % (rgb)
2. Converting HEX to RGB
# Module to convert hex to rgb
def hex_to_rgb(value):
value = value.lstrip('#')
return tuple(int(value[i:i+2], 16) for i in (0, 2 ,4))

Bless my heart! Didn’t realize your technical genious. Maybe following you some of it can rub on me! eh? 🙂
LikeLiked by 2 people
He he.. It all started from technical and landed in general writing.. 🙂
ha ha.. 😛 Thank you for stopping by!
LikeLiked by 1 person
PH? I continue climbing the mountain top. Every minute of my waking hours, even my sleeping hours, I’m getting closer, closer, closer to the summit! How? Don’t ask! Just keep watching my task. All I can see like a bee, are the flowers to soak up the pollen for the honey to be!
BTW wish you could remote me and fix my jumping mouse and my jumping computer at its will not mine. I done exhausted all my wealth of comp. knowledge to fix the problem to no avail. So? I suffer! 🙂
LikeLiked by 1 person
I see that Journey and it is going to be worth.
I wish you find some help nearby around soon and fix the deal of jumping 🙂
LikeLike
I will. All I have to do is wait. PATIENTLY wait! lol
LikeLiked by 2 people