diff --git a/poetry.lock b/poetry.lock index d96a123..d3c2553 100644 --- a/poetry.lock +++ b/poetry.lock @@ -18,18 +18,10 @@ category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -[[package]] -name = "webcolors" -version = "1.12" -description = "A library for working with color names and color values formats defined by HTML and CSS." -category = "main" -optional = false -python-versions = ">=3.7" - [metadata] lock-version = "1.1" python-versions = "^3.10" -content-hash = "344e75d90f66f638f33d26da388b3b24a06af9e2623edf8d205cd0804d649079" +content-hash = "62a1d52e8a91f47de2bc1e7569559a61c7ff8b0d63ab0e8ba648c6c230b4f96b" [metadata.files] Pillow = [ @@ -124,7 +116,3 @@ pycryptodomex = [ {file = "pycryptodomex-3.15.0-pp36-pypy36_pp73-win32.whl", hash = "sha256:35a8f7afe1867118330e2e0e0bf759c409e28557fb1fc2fbb1c6c937297dbe9a"}, {file = "pycryptodomex-3.15.0.tar.gz", hash = "sha256:7341f1bb2dadb0d1a0047f34c3a58208a92423cdbd3244d998e4b28df5eac0ed"}, ] -webcolors = [ - {file = "webcolors-1.12-py3-none-any.whl", hash = "sha256:d98743d81d498a2d3eaf165196e65481f0d2ea85281463d856b1e51b09f62dce"}, - {file = "webcolors-1.12.tar.gz", hash = "sha256:16d043d3a08fd6a1b1b7e3e9e62640d09790dce80d2bdd4792a175b35fe794a9"}, -] diff --git a/pyproject.toml b/pyproject.toml index 6d6f3d3..ea55052 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "tinydenticon" -version = "0.1.0" +version = "0.1.1" description = "identicon.js compatible Identicon implementation in Python 3" authors = ["tinytengu "] license = "GPL-3.0-only" @@ -10,7 +10,6 @@ repository = "https://github.com/tinytengu/tinydenticon" [tool.poetry.dependencies] python = "^3.10" Pillow = "^9.2.0" -webcolors = "^1.12" pycryptodomex = "^3.15.0" diff --git a/requirements.txt b/requirements.txt index 2ad794b..81edf54 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,2 @@ Pillow==9.2.0 pycryptodomex==3.15.0 -webcolors==1.12 diff --git a/tinydenticon/utils.py b/tinydenticon/utils.py index dcb5782..63ec58b 100644 --- a/tinydenticon/utils.py +++ b/tinydenticon/utils.py @@ -1,4 +1,3 @@ -import webcolors from Cryptodome.Hash import SHA512 @@ -64,7 +63,7 @@ def hue_to_rgb(hue): def rgb_percent_to_rgb(rgb_percent: tuple[str]) -> tuple[float]: - return webcolors.rgb_percent_to_rgb(["%i%%" % (p * 100) for p in rgb_percent]) + return [(percent * 100) / 255 for percent in rgb_percent] def hsl_to_rgb_percent(hue, saturation, lightness):