Skip to main content

majocol

Pick major colors from image

Test Coverage Package version


Documentation:

Demo:


MajoCol

Requirements

Python 3.6+

Installation

$ pip3 install majocol

Example

from majocol import color, convert

# Using Pillow (Open local image)
from PIL import Image

image = Image.open(<IMAGE_PATH>)
image_ndarr = convert.pillow_to_rgb_ndarr(image)
colors = color.pick(image_ndarr, 3)


# Using opencv-python (Open local image)
import cv2

image = cv2.imread(<IMAGE_PATH>)
image_ndarr = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)
colors = color.pick(image_ndarr, 3)


# Using requests (Fetch web image)
import requests

resp = requests.get(<IMAGE_URL>)
image_ndarr = convert.byte_to_rgb_ndarr(resp.content)
colors = color.pick(image_ndarr, 3)

— 🪄 —

MajoCol is licensed under the terms of the MIT license.

Release files for majocol 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for majocol 0.1.6
File Size Uploaded
majocol-0.1.6.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for majocol 0.1.6
File Interpreter ABI Platform
majocol-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 7.6 kB

Release files / majocol-0.1.6.tar.gz

Download URL majocol-0.1.6.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
325df053bf935983e3e47b90d09b0d6662d0f749c90147ad2b292b5a12b230cd
BLAKE2b-256 checksum
How to use checksums
14307cec6b246708be9c545b9365d15e0e19e3acdc45f2f54ea5c54033ddfab7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.8.5 Linux/5.4.0-1025-azure

Release files / majocol-0.1.6-py3-none-any.whl

Download URL majocol-0.1.6-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79fccd63ee47ae039244a354e751c389b5bf1faf879c97e37258a5662cfc7c1e
BLAKE2b-256 checksum
How to use checksums
82f9a3d15949b05e0bc188103ee3a27eb016b79f0688a81640ee2b6e15eb5fcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.10 CPython/3.8.5 Linux/5.4.0-1025-azure

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page