Skip to main content

colorforms

Convert colors from one format to another.

This tool will read a color in rgb or hex format piped from stdin, and convert to the opposite format (rgb -> hex, hex -> rgb).

Example:

$ echo "#FFEE00" | colorforms
rgb(255, 238, 0)

Usage notes:

The following patterns are valid:

hhh           (rgb)
#hhh          (rgb)
hhhh          (rgba)
#hhhh         (rgba)
hhhhhh        (rgb)
#hhhhhh       (rgb)
hhhhhhhh      (rgba)
#hhhhhhhh     (rgba)
rgb(n,n,n)    (rgb)
rgb(n,n,n,n)  (rgba)
rgba(n,n,n,n) (rgba)

Installation

From PyPi:

pip install colorforms

...or...

python -m pip install colorforms

Geany integration

I use this tool inside Geany, to quickly convert colors back and forth with a keyboard shortcut.

  1. From the Geany menu, select "Edit -> Format -> Send selection to -> Set custom commands"
  2. In the popup dialog, choose an empty Command / Label line. In the "Command" field, type "colorforms". Add an appropriate label, such as "Convert color format".

Now this tool will be available from the Edit menu.

  1. Select the string you want to convert.
  2. From the Geany menu, select "Edit -> Format -> Send selection to -> Convert color format"

If you put this tool in one of the first three lines, you automatically get a keyboard shortcut you can use to invoke it. For example, entering colorforms on line 2 will make it possible to select a color value, and simply press "CTRL-2" to convert to the opposite format.

Metadata

Release files for colorforms 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for colorforms 1.1.0
File Size Uploaded Provenance
colorforms-1.1.0.tar.gz 15.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for colorforms 1.1.0
File Interpreter ABI Platform
colorforms-1.1.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 32.1 kB

Release files / colorforms-1.1.0.tar.gz

Download URL colorforms-1.1.0.tar.gz
Size 15.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f914515ee5ccb65be56a2b661b9503433773374dd3bd78f95f7de61cdc9fe3ca
BLAKE2b-256 checksum
How to use checksums
dfdd6b7a6d039a35412f7314d17653a5557482371231ffa2e117d947ba84e5b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / colorforms-1.1.0-py2.py3-none-any.whl

Download URL colorforms-1.1.0-py2.py3-none-any.whl
Size 16.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
bd4a820f5faa9b7c3e1b961bf7646d858f7ad3cb6ba6a7b15558971e5f00e4c2
BLAKE2b-256 checksum
How to use checksums
a5971b7cb16014c05fddf7ee652f9192c83064ecef472206e02330f6d7802e3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for colorforms 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page