colour.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <html><head><title>Python: colour</title>
  3. </head><body bgcolor="#f0f0f8">
  4. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
  5. <tr bgcolor="#7799ee">
  6. <td valign=bottom>&nbsp;<br>
  7. <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>colour</strong></big></big></font></td
  8. ><td align=right valign=bottom
  9. ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/Users/hollis/Desktop/nakedmud/lib/pymodules/colour.py">/Users/hollis/Desktop/nakedmud/lib/pymodules/colour.py</a></font></td></tr></table>
  10. <p><tt>colour.py<br>
  11. &nbsp;<br>
  12. NakedMud's&nbsp;base&nbsp;colour&nbsp;module.&nbsp;Contains&nbsp;functions&nbsp;for&nbsp;outbound&nbsp;text&nbsp;processing<br>
  13. to&nbsp;add&nbsp;ASCII&nbsp;colour&nbsp;codes&nbsp;to&nbsp;the&nbsp;text.</tt></p>
  14. <p>
  15. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  16. <tr bgcolor="#aa55cc">
  17. <td colspan=3 valign=bottom>&nbsp;<br>
  18. <font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
  19. <tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  20. <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="hooks.html">hooks</a><br>
  21. </td><td width="25%" valign=top><a href="mud.html">mud</a><br>
  22. </td><td width="25%" valign=top><a href="mudsock.html">mudsock</a><br>
  23. </td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
  24. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  25. <tr bgcolor="#eeaa77">
  26. <td colspan=3 valign=bottom>&nbsp;<br>
  27. <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
  28. <tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  29. <td width="100%"><dl><dt><a name="-__unload__"><strong>__unload__</strong></a>()</dt><dd><tt>detaches&nbsp;our&nbsp;colour&nbsp;module&nbsp;from&nbsp;the&nbsp;game</tt></dd></dl>
  30. <dl><dt><a name="-process_colour_hook"><strong>process_colour_hook</strong></a>(info)</dt><dd><tt>When&nbsp;outbound&nbsp;text&nbsp;is&nbsp;being&nbsp;processed,&nbsp;find&nbsp;colour&nbsp;codes&nbsp;and&nbsp;replace&nbsp;them<br>
  31. by&nbsp;the&nbsp;proper&nbsp;colour&nbsp;escape&nbsp;sequences.</tt></dd></dl>
  32. </td></tr></table><p>
  33. <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
  34. <tr bgcolor="#55aa55">
  35. <td colspan=3 valign=bottom>&nbsp;<br>
  36. <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
  37. <tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
  38. <td width="100%"><strong>base_colour_marker</strong> = '{'<br>
  39. <strong>base_colours</strong> = {'b': '34', 'c': '36', 'd': '30', 'g': '32', 'n': '0', 'p': '35', 'r': '31', 'w': '37', 'y': '33'}<br>
  40. <strong>cDARK</strong> = '0'<br>
  41. <strong>cLIGHT</strong> = '1'<br>
  42. <strong>c_blue</strong> = 'b'<br>
  43. <strong>c_cyan</strong> = 'c'<br>
  44. <strong>c_dark</strong> = 'd'<br>
  45. <strong>c_green</strong> = 'g'<br>
  46. <strong>c_magenta</strong> = 'p'<br>
  47. <strong>c_none</strong> = 'n'<br>
  48. <strong>c_red</strong> = 'r'<br>
  49. <strong>c_white</strong> = 'w'<br>
  50. <strong>c_yellow</strong> = 'y'<br>
  51. <strong>colour_start</strong> = '<font color="#c040c0">\x1b</font>['</td></tr></table>
  52. </body></html>