dominantcolorrecognizer-1.0.0


توضیحات

Python library created to obtain a specific number of dominant colors from an image.
ویژگی مقدار
سیستم عامل -
نام فایل dominantcolorrecognizer-1.0.0
نام dominantcolorrecognizer
نسخه کتابخانه 1.0.0
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Wojciech Batorski
ایمیل نویسنده wojciech.batorski@bitapps.fi
آدرس صفحه اصلی -
آدرس اینترنتی https://pypi.org/project/dominantcolorrecognizer/
مجوز Bitapps
# Dominant Color Recognizer ## General info DCR is a Python library created to obtain a specific number of dominant colors from image. You can define number of colors and color model in which values will be returned. Currently supported color models: | Color model | Example | |--------------|-----------------| | HEX | #0040ff | | RGB | rgb(0, 64, 255) | ## Instalation Use the package manager [pip](https://pip.pypa.io/en/stable/getting-started/) to install DCR library: ```commandline pip install dominantcolorrecognizer ``` ## Usage ```python from dominant_color_recognizer import ColorAnalyzer, RGBColorModel, HEXColorModel # RGB color model: print(ColorAnalyzer(RGBColorModel()).get_dominant_colors('test.jpg', 3)) # You can also use URL print(ColorAnalyzer(RGBColorModel()).get_dominant_colors('https://swiatkolorow.com.pl/userdata/public/gfx/252817/1ee9698f09e987d3e9a3785167b180b0.jpg', 3)) # Expected result: # ["(185, 154, 90)", "(52, 40, 24)", "(25, 18, 0)"] # HEX color model: print(ColorAnalyzer(HEXColorModel()).get_dominant_colors('test.jpg', 3)) # Same as with RGB, you can also use URL print(ColorAnalyzer(HEXColorModel()).get_dominant_colors('https://swiatkolorow.com.pl/userdata/public/gfx/252817/1ee9698f09e987d3e9a3785167b180b0.jpg', 3)) # Expected result: # ['#B99A5A', '#342818', '#191200'] ``` ## Tests To run a tests you have to install [pytest](https://pypi.org/project/pytest/) and run it with the command: ```commandline pytest ``` ## License Bittapps


نیازمندی

مقدار نام
>=1.0.0,<2.0.0 extcolors
>=1.0.4,<2.0.0 colormap
>=0.12.0,<0.13.0 easydev
>=22.10.0,<23.0.0 black
>=0.990,<0.991 mypy
>=5.10.1,<6.0.0 isort


زبان مورد نیاز

مقدار نام
>=3.10,<4.0 Python


نحوه نصب


نصب پکیج whl dominantcolorrecognizer-1.0.0:

    pip install dominantcolorrecognizer-1.0.0.whl


نصب پکیج tar.gz dominantcolorrecognizer-1.0.0:

    pip install dominantcolorrecognizer-1.0.0.tar.gz