git: ee97dc413dcb - main - graphics/py-colorz: New port: Color scheme generator

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Thu, 11 May 2023 23:26:40 UTC
The branch main has been updated by fuz:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ee97dc413dcb97db56099af13ba5ce9e74b1d3c3

commit ee97dc413dcb97db56099af13ba5ce9e74b1d3c3
Author:     Jesús Daniel Colmenares Oviedo <DtxdF@disroot.org>
AuthorDate: 2023-05-01 12:46:28 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-05-11 23:23:32 +0000

    graphics/py-colorz: New port: Color scheme generator
    
    A color scheme generator. Takes an image (local or online) and grabs
    the most dominant colors using kmeans. Also creates bold colors by
    adding value to the dominant colors. Finally, outputs the colors
    to stdout (one normal and one bold per line, space delimited) and
    generates an HTML preview of the color scheme.
    
    WWW: https://github.com/metakirby5/colorz/
    
    PR:             266117
---
 graphics/Makefile            |  1 +
 graphics/py-colorz/Makefile  | 21 +++++++++++++++++++++
 graphics/py-colorz/distinfo  |  3 +++
 graphics/py-colorz/pkg-descr |  5 +++++
 4 files changed, 30 insertions(+)

diff --git a/graphics/Makefile b/graphics/Makefile
index e2bc40e9f419..755c9a6de475 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -852,6 +852,7 @@
     SUBDIR += py-cogdumper
     SUBDIR += py-colorcet
     SUBDIR += py-colorthief
+    SUBDIR += py-colorz
     SUBDIR += py-colour
     SUBDIR += py-descartes
     SUBDIR += py-django-easy-thumbnails
diff --git a/graphics/py-colorz/Makefile b/graphics/py-colorz/Makefile
new file mode 100644
index 000000000000..fda6723a157d
--- /dev/null
+++ b/graphics/py-colorz/Makefile
@@ -0,0 +1,21 @@
+PORTNAME=	colorz
+DISTVERSION=	1.0.3
+CATEGORIES=	graphics python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER=	DtxdF@disroot.org
+COMMENT=	Color scheme generator
+WWW=		https://github.com/metakirby5/colorz/
+
+LICENSE=	MIT
+
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy@${PY_FLAVOR}
+
+USES=		python
+USE_PYTHON=	autoplist distutils
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/graphics/py-colorz/distinfo b/graphics/py-colorz/distinfo
new file mode 100644
index 000000000000..3bca4211c174
--- /dev/null
+++ b/graphics/py-colorz/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1661849528
+SHA256 (colorz-1.0.3.tar.gz) = c04ff63896281f2ee1327bcdff2e76a339f70559abd8a25d28c0d1fb28480d3e
+SIZE (colorz-1.0.3.tar.gz) = 5109
diff --git a/graphics/py-colorz/pkg-descr b/graphics/py-colorz/pkg-descr
new file mode 100644
index 000000000000..b6568043a923
--- /dev/null
+++ b/graphics/py-colorz/pkg-descr
@@ -0,0 +1,5 @@
+A color scheme generator. Takes an image (local or online) and grabs
+the most dominant colors using kmeans. Also creates bold colors by
+adding value to the dominant colors. Finally, outputs the colors
+to stdout (one normal and one bold per line, space delimited) and
+generates an HTML preview of the color scheme.