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()

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.1.tar.gz (292.6 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.1-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for chromasoul_color_transfer-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3bd98dcc01822fb230f806232efffb34e56074a4f902e285d00542d5595aa9f9
MD5 d2a3aa36aa37de53e464f79f0fd761ca
BLAKE2b-256 5442c7c6b05e567b92152bd375150599e934ab461525124f4d1f788d752c1a87

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chromasoul_color_transfer-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4e18806d34ed6c401ecff96a7f030775b10c2da86594d6a3bdc36f10682a85a5
MD5 2e1e4f2c92f655c1f92902f7c5de98e3
BLAKE2b-256 1bde53e5ef46a03ac0906e8a8f58a726e43334f9fcc1eb39706f00a871bbac1e

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