Skip to main content

A package to generate color sequences from videos and images

Project description

pyrolld

A package to generate color sequences from videos and images

Its main use is to create a set of unique colors from an image and then sort the colors according to the selected sorting method.

Installation

You can simply pip install this package:

pip install pyrolld

Usage

Here is an example:

from rolld import Roller


filepath = "image.png"
image = Roller(filepath)
rolled = image.roll()

rolled.show()

You can also chose between 3 different sorting methods ["HSV", "HSL", "YIQ", "LUM"]:

from rolld import Roller


filepath = "image.png"
image = Roller(filepath)
rolled = image.roll(sorter="LUM")

rolled.show()

Example

Here is an example. We are going to use the image lena.png:

And with this code we will "roll" the image:

from rolld import Roller


filepath = "lena.png"
roller = Roller(filepath)

sorters = ["HSV", "HSL", "YIQ", "LUM"]
for sorter in sorters:
    image = roller.roll(sorter=sorter)
    image.show()

Here is the output of all the sorting methods:

Luminance

YIQ

HSV

HSL

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyrolld-0.2.2.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

pyrolld-0.2.2-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page