Skip to content

zhenzi0322/color-convert

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Color Conversion Tool

Installation

pip install color-convert

Hexadecimal to rgb

from color_convert import color

rgb = color.hex_to_rgb('#fff000')
print(rgb)  # rgb(255,240,0)

Hexadecimal to rgba

from color_convert import color

rgba = color.hex_to_rgba('#fff000')
print(rgba)  # rgba(255,240,0,1)

Decimal to hexadecimal

from color_convert import color

hex = color.ten_to_hex(16711680)
print(hex)  # #ff0000

Decimal to rgb

from color_convert import color

hex_rgb = color.ten_to_rgb(16711680)
print(hex_rgb)  # rgba(255,0,0,1)

文档地址

请参考 color_convert

About

Color Conversion

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published