DEV Community

Samandar Ravshanov
Samandar Ravshanov

Posted on

📦Convert HEX color to RGBA

from functorflow import f

r = f('hex-rgba', '#4183c4')
print(r) # {'red': 65, 'green': 131, 'blue': 196, 'alpha': 1}


r = f('hex-rgba', 'cd2222cc')
print(r) # {'red': 205, 'green': 34, 'blue': 34, 'alpha': 0.8}
Enter fullscreen mode Exit fullscreen mode

Stop wasting time installing and configuring Python libraries. Use them right away. 📦FunctorFlow instantly auto-install and auto-config them for you.

Top comments (0)