Created
February 20, 2014 20:25
-
-
Save erinaceous/9122468 to your computer and use it in GitHub Desktop.
i am very mature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# vim: set tabstop=4 shiftwidth=4 textwidth=79 cc=72,79: | |
""" | |
Not Web Safe: Exploration Of Swear Words Represented In The Hexadecimal | |
Colour Space, a study by Courtney Aspinall and Owain Jones | |
Original Author: Owain Jones [github.com/doomcat] [contact@odj.me] | |
""" | |
from __future__ import print_function | |
# Only swears that aren't offensive to any race, sexuality, ability, ... | |
# This is an unfortunately limited list. Fucking swearwords. | |
swears = set([ | |
'tit', 'fanny', 'bum', 'poo', 'ass', 'arse', 'wank', 'shit', 'shite', | |
'shitey', 'wee', 'crap', 'bastard', 'bastad', 'boner', 'cock', 'damn', | |
'darn', 'dick', 'fuck', 'jizz', 'muff', 'piss', 'scrote', 'smeg' | |
]) | |
swears = sorted(swears) | |
def colourful_swearing(word): | |
colour = ''.join(['%d' % (ord(x) % ord('A') + 1) for x in word.upper()]) | |
if len(colour) not in [3, 6, 8]: | |
return None | |
return '#' + colour | |
if __name__ == '__main__': | |
print("<title>Exploration Of Swears Represented In Hex Colours m8</title>") | |
print("<style>html{ background-color: #CCC; font-size: 32pt; " + | |
"text-shadow: white 0px 0px 3px; font-weight: bold; " + | |
"text-align: center; }</style>") | |
for swear in swears: | |
colour = colourful_swearing(swear) | |
if colour is not None: | |
print("<span style='color: %s'>%s = %s</span><br />" % | |
(colour, swear.upper(), colour)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<title>Exploration Of Swears Represented In Hex Colours m8</title> | |
<style>html{ background-color: #CCC; font-size: 32pt; text-shadow: white 0px 0px 3px; font-weight: bold; text-align: center; }</style> | |
<span style='color: #118195'>ARSE = #118195</span><br /> | |
<span style='color: #21192014'>BASTAD = #21192014</span><br /> | |
<span style='color: #21514518'>BONER = #21514518</span><br /> | |
<span style='color: #315311'>COCK = #315311</span><br /> | |
<span style='color: #318116'>CRAP = #318116</span><br /> | |
<span style='color: #411314'>DAMN = #411314</span><br /> | |
<span style='color: #411814'>DARN = #411814</span><br /> | |
<span style='color: #61141425'>FANNY = #61141425</span><br /> | |
<span style='color: #621311'>FUCK = #621311</span><br /> | |
<span style='color: #132166'>MUFF = #132166</span><br /> | |
<span style='color: #161515'>POO = #161515</span><br /> | |
<span style='color: #198920'>SHIT = #198920</span><br /> | |
<span style='color: #191357'>SMEG = #191357</span><br /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment