Skip to content

Instantly share code, notes, and snippets.

@cmang
cmang / test_extended_colors.py
Last active May 18, 2024 13:16
Test extended curses colors. Make your terminal kind of big for this one. Like 35 lines, 105 columns.
#!/usr/bin/env python3
# Test program for ncurses extended color pairs. (by Sam Foster, may 2024)
#
# Generates 256 foreground colors, background color 0, to use the first 256 color pairs.
# Then does the same for BG color 1, then 2, etc. until we have 256 * 256 pairs.
#
# If it works, we should end up with every combination of FG colors 0-255 and BG colors 0-255.
# If it doesn't work right, the color pairs repeat themselves.
#