Skip to main content

A simple library to invert RGB colors.

Project description

invertcolor

invertcolor is a lightweight Python library for inverting RGB color values. It makes it simple to generate the complementary color of any RGB input.

Features

  • Invert any RGB color tuple (R, G, B)
  • Easy to use with a single function call
  • Lightweight and dependency-free

Installation

Install via PyPI:

pip install invertcolor

Usage

The main function, invert_rgb_color, takes an RGB color tuple and returns its inverted color.

from invertcolor import invert_rgb_color

# Original color: red
red = (255, 0, 0)

# Inverted color: cyan
inverted_red = invert_rgb_color(red)

print(f"Inverted color: {inverted_red}")
# Output: (0, 255, 255)

# Another example: gray
gray = (128, 128, 128)
inverted_gray = invert_rgb_color(gray)
print(f"Inverted gray: {inverted_gray}")
# Output: (127, 127, 127)

Contributing

Contributions, issues, and feature requests are welcome! Feel free to fork the repository and submit a pull request. Repository link

License

This project is licensed under the MIT License.

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

invertcolor-0.1.0.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

invertcolor-0.1.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file invertcolor-0.1.0.tar.gz.

File metadata

  • Download URL: invertcolor-0.1.0.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for invertcolor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8d111ade504b5e0a83f09355c75471bf59732506e9b9299f61d0a14f1c93478e
MD5 18e945847bcf2f44b8c29051b9bec936
BLAKE2b-256 f2b6d73b637efba40229e9ce9193e6817d754df101246cfbc86355f7daef46bd

See more details on using hashes here.

File details

Details for the file invertcolor-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: invertcolor-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for invertcolor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63b09df1b50fd171fb5ef7d4e3b3dd5b1e19e7c7a7c836b3e0ed034f9341aaa0
MD5 97d6e586885c8b02dced8da175e3661d
BLAKE2b-256 234014aa081f3d347738289ffe8ed342cc18e1354153f7bf1bcf747df2a28e7b

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