Skip to main content

get-my-palette-from-image is a python library for extracting and manipulating palettes from images

Project description

get-my-palette-from-image

get-my-palette-from-image is a python library for extracting and manipulating palettes from images

GitHub GitHub issues Build Status codecov PyPI Docs

Overview

  • Input: image, URL
  • Functions:
    • extract palettes with self-defined numbers of colors from given images
    • shuffle/modify extracted palettes
    • obtain the percentages of colors from given images
    • find/generate posters/images based on extracted palettes

Installation

pip install get-my-palette-from-image

Usage

from my_palette import PaletteCreation

palette = PaletteCreation()

# load image locally
modified_image = palette.load_image('down.jpg')

# load image via url
modified_image_url = palette.load_image_url(
    'https://apod.nasa.gov/apod/image/2212/SkyArt_Cobianchi_2048.jpg')

# obtain the percentage of colors from the given image
percentage = palette.get_color_percentages(modified_image, 5)

# get a palette from given image with a self-defined number of colors
the_palette = palette.get_palette(modified_image, 5)

# get a complementary palette from given image with a self-defined number of colors
complementary_palette = palette.get_complementary_palette(
    modified_image, 5)

# get a palette consisted of a self-defined number of colors with the least percentages
least_palette = palette.get_least_palette(modified_image, 3)

# get a palette consisted of a self-defined number of colors with the most percentages
most_palette = palette.get_most_palette(modified_image, 3)

# get a palette with consisted of a self-defined number of similar colors from the given image and given color schema.
# the color schema includes red, blue, green, yellow, black, white, purple, orange, and pink
similar_palette = palette.get_similar_palette(modified_image, 3, 'black')

Development

Read the CONTRIBUTING.md file.

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

get-my-palette-from-image-0.1.3.tar.gz (31.8 kB view hashes)

Uploaded Source

Built Distribution

get_my_palette_from_image-0.1.3-py3-none-any.whl (23.4 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