Added first working version of the library; updated README, .gitignore and LICENSE
This commit is contained in:
parent
b9b1620e89
commit
46de665176
7 changed files with 208 additions and 2 deletions
14
yahuelib/utils.py
Normal file
14
yahuelib/utils.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Copyright (c) 2023 Julian Müller (ChaoticByte)
|
||||
|
||||
|
||||
from colorsys import rgb_to_hsv as _rgb_to_hsv
|
||||
|
||||
|
||||
def rgb_to_hsv(r:int, g:int, b:int) -> float:
|
||||
assert type(r) == int
|
||||
assert type(g) == int
|
||||
assert type(b) == int
|
||||
r_ = r / 255.0
|
||||
g_ = g / 255.0
|
||||
b_ = b / 255.0
|
||||
return _rgb_to_hsv(r_, g_, b_)
|
Reference in a new issue