Answers for "python rgb to color name"

1

color name to hex python

import matplotlib
print(matplotlib.colors.cnames["blue"])
  --> u'#0000FF'
Posted by: Guest on July-09-2021
1

python rgb colors

# In Python, colors can just be stored as 3-Tuples of (Red, Green, Blue).
red = (255,0,0)
green = (0,255,0)
blue = (0,0,255)

# Many libraries work with these.
# You can also, of course, define your own functions to work with them.
Posted by: Guest on December-18-2021

Python Answers by Framework

Browse Popular Code Answers by Language