quickly find the nearest xterm 256 color index of an RGB
Project description
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
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
x256offline-0.0.4.tar.gz
(284.7 kB
view hashes)
Built Distribution
x256offline-0.0.4-py3-none-any.whl
(284.8 kB
view hashes)
Close
Hashes for x256offline-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 267481808aa884e771a7f4530d00063ae38ff018d11d9b50aaef3476f8a5c570 |
|
MD5 | 9794e6ee61cdbbbf14ced54dffd38111 |
|
BLAKE2b-256 | e16384b0af8337a68ee2a0ecce0d28686d696f91369c3beba006c5a921e1b3c0 |