Skip to main content

x256offline

Quickly find the nearest xterm 256 color index of an RGB.

Installation

python -m pip install x256offline

Simple Example

import x256offline as x256

c0 = 0x23307b
x0e = x256.from_rgb(c0)
x0w = x256.from_rgb(c0, weighted=True)

print(hex(c0))
print(x0e, hex(x256.to_rgb(x0e)))
print(x0w, hex(x256.to_rgb(x0w)))

# 0x23307b
# 4 0x80
# 24 0x5f87

Metadata

Release files for x256offline 0.0.4

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

Source distribution (sdist)

Source distribution for x256offline 0.0.4
File Size Uploaded
x256offline-0.0.4.tar.gz 284.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for x256offline 0.0.4
File Interpreter ABI Platform
x256offline-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 569.5 kB

Release files / x256offline-0.0.4.tar.gz

Download URL x256offline-0.0.4.tar.gz
Size 284.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2d76470b20bf4773677bd9c44120d8979df577ea744bf0ba7eeb74308ac4c7e0
BLAKE2b-256 checksum
How to use checksums
497e3e5e438f02bb4d6c221abafc771a5debc8df42280ad7153980fbb9420f90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / x256offline-0.0.4-py3-none-any.whl

Download URL x256offline-0.0.4-py3-none-any.whl
Size 284.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
267481808aa884e771a7f4530d00063ae38ff018d11d9b50aaef3476f8a5c570
BLAKE2b-256 checksum
How to use checksums
e16384b0af8337a68ee2a0ecce0d28686d696f91369c3beba006c5a921e1b3c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.1

2 release files

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