Skip to main content

ColorTransfer provides a suite of tools for color migration tasks.

Project description

ColorTransfer

English | 中文


Project Overview

ColorTransfer provides a suite of tools for color migration tasks.

Installation

# from pypi
pip install chromasoul_color_transfer

# from release
pip install chromasoul_color_transfer-1.0.1-py3-none-any.whl

# from source code(without uv)
pip install -e .

# from source code(with uv)
uv sync

Quick start

  1. Use the cli tool.
color_transfer --input /path/to/input_image --reference /path/to/reference_image --output /path/to/output_image

# or shortcut
color_transfer -i /path/to/input_image -r /path/to/reference_image -o /path/to/output_image
  1. Use the example code.
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from color_transfer.libs import TransferFactory
from color_transfer.utils import ImageUtils


def main():
    # init image transfer
    transfer = TransferFactory.create("mean_std")

    # load the images
    img_ref = ImageUtils.load_img("path/to/input_image")
    img = ImageUtils.load_img("path/to/reference_image")

    # load the images
    transfer.extract(img_ref)
    img_tgt = transfer.transfer(img)

    # the target dir will be auto created
    ImageUtils.save_img(img_tgt, "path/to/output_image")


if __name__ == "__main__":
    main()

Available Methods

  • mean_std
  • lab (Reinhard)
  • pdf (Probability Density Function)

License

This project is licensed under the AGPLv3 License. This means you are free to use, modify, and distribute the code, but any modifications or services based on this project must be open-sourced under the same license. For commercial closed-source integration, please contact us for a commercial license.

See the LICENSE file for details.

Contact Me


ChromaSoul - Let every color find its soul mate ✨

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

chromasoul_color_transfer-1.0.2.tar.gz (296.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chromasoul_color_transfer-1.0.2-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file chromasoul_color_transfer-1.0.2.tar.gz.

File metadata

File hashes

Hashes for chromasoul_color_transfer-1.0.2.tar.gz
Algorithm Hash digest
SHA256 e18a847e3dae0b52f5f8d4be97e76ed6e6771074c1b1bddb12f69a1f0a3b9dc1
MD5 dbdbfdcfd8b9a4ae35e9320c09b93ff2
BLAKE2b-256 fd2cf379ce3e2f1642baf7cf6c1c1c2ca2aeb7b72c81740a6e61e74ec21e8b56

See more details on using hashes here.

File details

Details for the file chromasoul_color_transfer-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for chromasoul_color_transfer-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0569ade73f35ad936783b977eda99764dbda840b8d3bc7fdba10c6bf6b045222
MD5 c1dcee455e7f2c65f4f61f16da14d343
BLAKE2b-256 81fd3036a63cbc5bd38ba0f9b28763a5dc8b04d2b812a9b0058daad6a50499f8

See more details on using hashes here.

Supported by

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