Skip to content

Latest commit

 

History

History
16 lines (10 loc) · 280 Bytes

README.md

File metadata and controls

16 lines (10 loc) · 280 Bytes

py256color

Convert between 256 colors and RGB.

The implementation is based on colour.c from tmux.

Usage

from py256color import from_rgb, to_rgb

from_rgb(42, 84, 126)  # 24

to_rgb(96)  # (135, 95, 135)