about summary refs log blame commit diff stats
path: root/enumerate/Readme
blob: 2e0649f9e32cafebb42279fed40c1ca5e0aeedd6 (plain) (tree)
1
                                
Tool used in Mu's build process.
Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/usr/bin/env python
"""
You can use this tool to display all supported colors and their color number.
It will exit after a keypress.
"""

import curses
from curses import *

@wrapper
def main(win):
	def print_all_colors(attr):
		for c in range(0, curses.COLORS):
			init_pair(c, c, -1)
			win.addstr(str(c) + ' ', color_pair(c) | attr)
	use_default_colors()
	win.addstr("available colors: %d\n\n" % curses.COLORS)
	print_all_colors(0)
	win.addstr("\n\n")
	print_all_colors(A_BOLD)
	win.refresh()
	win.getch()