Skip to content

colorred a python module that can name any hex or RGB color as accurately as possible.

License

Notifications You must be signed in to change notification settings

SabaOrk/colorred

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

COLORRED

colorred is a python module that can name every HEX or RGB color code as accurately as possible.

pasted image 0

#INSTALLATION

installing colorred_py with pip

pip install colorred_py

USING COLORRED:

there are couple of ways to use colorred. first one is to convert hex or rgb to a color group

  • WHITE
  • BLACK
  • RED
  • BLUE
  • BROWN
  • GREEN
  • YELLOW
  • ORANGE
  • PURPLE
  • PINK
  • CYAN
  • GRAY

you can call color_group_by_rgb or color_group_by_hex

from colorred_py.colorize import color_group_by_hex, color_group_by_rgb

color_name1 = color_group_by_hex('#fff232')
color_name2 = color_group_by_rgb((255, 242, 50))

print(color_name1)
print(color_name2)

as both colors are the exact same colors the output will be

white
white

closest_color_by_rgb or closest_color_by_hex returns more specific color names you can see all of the available named colors in todays css HTML Color Names

from colorred_py.colorize import closest_color_by_hex

color_name1 = closest_color_by_hex('#ff00ff')

print(color_name1)

output:

magenta

About

colorred a python module that can name any hex or RGB color as accurately as possible.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages