Popular recipes by Paul Winkler http://code.activestate.com/recipes/users/135731/2004-01-23T07:25:22-08:00ActiveState Code RecipesHTML colors to/from RGB tuples (Python)
2004-01-23T07:25:22-08:00Paul Winklerhttp://code.activestate.com/recipes/users/135731/http://code.activestate.com/recipes/266466-html-colors-tofrom-rgb-tuples/
<p style="color: grey">
Python
recipe 266466
by <a href="/recipes/users/135731/">Paul Winkler</a>
(<a href="/recipes/tags/graphics/">graphics</a>).
Revision 2.
</p>
<p>You have colors in a number of formats (html-style #RRGGBB, rgb-tuples (r, g, b), and PIL-style integers). You want to convert between formats. It's pretty easy to do, but also pretty easy to forget; hence, this recipe.</p>
<p>Just for kicks, we'll extract an RGB tuple from an image file at the end.</p>
Roman Numerals (Python)
2001-10-14T23:51:40-07:00Paul Winklerhttp://code.activestate.com/recipes/users/135731/http://code.activestate.com/recipes/81611-roman-numerals/
<p style="color: grey">
Python
recipe 81611
by <a href="/recipes/users/135731/">Paul Winkler</a>
.
Revision 2.
</p>
<p>Functions to convert between integers and Roman numerals. Doctest examples included.</p>