python colornames
v1.1.0
ไลบรารี Python สำหรับการค้นหาชื่อสี
ห้องสมุด colornames
ให้ชื่อสี RGB ใด ๆ แก่คุณ หากสีที่แน่นอนที่คุณกำลังมองหาไม่มีชื่อมันจะพบการจับคู่ที่ใกล้เคียงที่สุดแทน
PYPI: Pycolornames
pip install pycolornames
ฟังก์ชั่นเดียว find
ถูกเปิดเผยโดยไลบรารี พบชื่อของสีที่กำหนด
>> > import colornames
>> > colornames . find ( 255 , 255 , 255 ) # Decimal RGB
'White'
>> > colornames . find ( '#3e3e3e' ) # Hexadecimal notation
'Dune'
>> > colornames . find ( '#abc' ) # Shorthand hexadecimal
'Cadet Blue'
>> > colornames . find ( 'f5f5f5' ) # Optional '#' prefix
'Wild Sand'
>> > colornames . find (( 123 , 12 , 1 )) # Decimal RGB as a tuple
'Dark Burgundy'
รหัสได้รับอนุญาตภายใต้ใบอนุญาต MIT บางส่วนได้รับใบอนุญาตภายใต้ CC โดย 2.5 (ดูกิตติกรรมประกาศ)
รายการชื่อสีขึ้นอยู่กับ NTC JS ของ Chirag Mehta ซึ่งได้รับใบอนุญาตภายใต้ CC โดย 2.5