

Show HN: What colour is your IP address? - imhobson
http://prettyip.meetstrange.com/

======
JackWebbHeller
People are bashing this for being 'pointless', but hey, so is the next great
to-do list app you made in 48 hours. This is a fun little experiment.

I can see an actual use for this. Look for example at Identicons, Wavatars,
and MonsterIDs[1]. They all use browser variables to generate random avatars
for use around the web, e.g. on blog comments. I imagine this could do
something similar, and a nice colour palette is a little more classy than a
monster.

[1] [http://blog.gravatar.com/2008/04/22/identicons-monsterids-
an...](http://blog.gravatar.com/2008/04/22/identicons-monsterids-and-wavatars-
oh-my/)

~~~
up_and_up
I see this as like an internet art installation. It injects art into an
unexpected place/space.

Finding patterns and/or meaning out of nothing is quite interesting.

Is art useless and not worth executing?

~~~
pdenya
Is generating a 4 color palette based of a random seed all it takes to be art?
Not to say it wasn't worth executing from a personal standpoint, it was
probably fun to build if nothing else, but really what possible use can anyone
else get out of this?

~~~
cormullion
These days, 'art' is an almost meaningless term, since it has to include this:

<http://www.tate.org.uk/art/artworks/creed-work-no-233-p78388>

~~~
quarterto
Art is anything that someone somewhere could claim is not art.

~~~
polarix
Is anything that anyone claims as art.

------
rachelbythebay
This seems to run as a script in your browser, and then calls out to some
helper to get your IP address. The original server (the one which hands you
the script in the first place) should have your IP address already, and in
theory, could create the page on the fly. That would make it work even with
NoScript or similar in force.

I guess client-side is the way most people do things these days.

~~~
Cogito
This way the server can serve a static cached page, and distribute the work to
derive the colour palette to the clients.

I agree that the server _could_ do this, and for a small app like it is this
wouldn't even be a big problem, however there is almost no impact on the end
user and this way scaling is handled by 'better caching' and serving static
pages faster.

Offloading to the client is a good thing in general, and I think there are few
cases where it is possible but not the better option.

~~~
rachelbythebay
The work to derive the palette? Do you mean RGB to HSL and back? That isn't
particularly CPU-intensive.

One of many implementations: [http://axonflux.com/handy-rgb-to-hsl-and-rgb-to-
hsv-color-mo...](http://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-
model-c)

I imagine you could precompute the entire 24 bit range if you really wanted.

I mean, this thing has a failure mode where it says it can't find your IP
address. That makes no sense until you look at how it was implemented.

------
marios
As a follow up to your little project, find out a way to color IPv6 addresses
::]

*edit: changed standard smiling emoticon to IPv6 smiling emoticon :P

------
mseebach
Cute little thing :) - but: A pallet is a flat transport structure that
supports goods in a stable fashion while being lifted by a forklift, pallet
jack, front loader or other jacking device. A palette is a given, finite set
of colors for the management of digital images.

~~~
pcole
Thanks! Its crazy how many little typos and issues get exposed by the HN crowd
even for a tiny experiment like this :-)

~~~
skeletonjelly
Free crowdsourcing!

------
jere
Neat. This kind of reminds me of something I did a while back: I had a
permissions manager that let you drag and drop groups to various actions, but
the color of each group was determined by hashing their the group ID into a
color.

The resulting colors had no special significance, but the important point is
they never changed and it let you easily visualize what was going on. I'm sure
this had been done many, many times before. The difference here is that the
straightforward conversion from IPs to colors means similar IPs will look very
similar, whereas hashing some value to a color results in similar values
looking vastly different.

------
Aardwolf
The 4th byte is thrown away... You could use it as alpha channel? Or CMYK
color.

~~~
imhobson
Considered it, but CMYK only go up to 100 in value - alpha channel could be an
option though...

~~~
chime
You can name the color too - <http://chir.ag/projects/ntc/>

It's not an exact match of course but I did my best to make it as close as
possible.

~~~
snogglethorpe
This is really cool, and useful.

[and for all the silly color names out there, it's actually pretty amazing how
_right_ most of the names that pop out of this tool seem... most really do
capture the essence of the color.]

------
imhobson
Here's a short blog post to go with this little project we made!
<http://meetstrange.com/blog/pretty-ip/>

~~~
tlrobinson
I like how you blur out the IP address but it could be trivially recovered by
sampling the colors :)

------
obviouslygreen
Yikes... it looks like my IP is about as good at color coordination as I am.

~~~
imhobson
Was it obviously green?

~~~
obviouslygreen
Clearly.

------
rdl
It would be nice if there were a less trivial mapping of IP address to color
-- something where ASN boundaries mattered, and maybe where netmask got taken
into account. (so a bunch of users on /29s and /30s within the same IP block
got related but different (and ideally distinguishable) colors.

It would still be a canonical IP to color mapping, but it wouldn't be as
literal a mapping of 32-bit address into 32-bit color.

------
stephengillie
Neat project! This got me thinking - Why are QR codes black and white?
Couldn't they transmit more information if they used colors?

~~~
raylu
Different cameras and software will do different kinds of automatic white
balance correction but nobody will screw it up so bad that you can't
differentiate black from white.

------
zuppy
You need to do something with the text over the color pallette. It took me a
while to see that there's actually something there and not a black background
<http://dl.dropbox.com/u/2311018/temp/ipcol.png> (I don't care that you can
see my ip, it's not private).

------
amputect
My IP address is a calming shade of green. That's not really a thing I
expected to learn today, but I'm oddly pleased by it.

------
bnewbold
What, no IPv6? :(

------
meej
Neat! My place of work has a surprisingly attractive IP address palette.

It would be cool if you could specify an IP address; I'd like to see what the
IP for my hosted VM looks like. (I suppose I could set up an SSH tunnel if I
am really curious...)

~~~
jrockway
_I'd like to see what the IP for my hosted VM looks like_

Step 1: determine IP address

Step 2: interpret the first three octets as red, green, and blue respectively

Step 3: there is no step 3.

------
orangethirty
I think this is very cool. A very creative way of showing off skills. Does it
help me with anything right now? I'm not sure. But it does show outside the
box thinking. I would definitely hire someone with such thought process.

------
moccajoghurt
Coding stuff for shits and giggles is the spirit that makes a good programmer.

------
gsiener
This would be a great bash addition for anyone that sshs into servers all day.
Just as some people color their console red in production or green for
staging, this would be a nice indicator of where you were.

------
niix
Hmm would be neat if the site saved the color scheme the user's IP created and
showed a list of them sans the actual address. But then again, the users IP
could be easier figured out by the colors as well :)

------
jimmaswell
Since this seems not to work, I made one that does.
<http://luna.thehorseplace.us/ipcolor.php>

------
zabomber
It's bugged..

Second pallete shows "183" instead of "173"

<http://imagebin.org/247232>

------
donquix
Looks like you've got a stray </script> closing tag. It didn't work in Firefox
on Mountain Lion, but it did in Chrome. I like it!

~~~
pcole
Thanks. That was part of the problem. Turns our $.get wasn't parsing the
response data as JSON in firefox. fixed now!

------
skot9000
I used something similar to differentiate between users on
<http://wrd.skot9000.com/>

------
kami8845
So who's going to create a colour map for these?

------
arb99
honestly who cares what 'colour' an ip address is? plus, it doesn't work

"Your IP Address is

We can't find it... Sorry! "

~~~
LukaD
Doesn't work for me either. I'm guessing it interprets the 4 octets as RGBA or
something similar. It's a cute idea.

~~~
pcole
Hey guys. Sorry its not working, its on a shared hosting, hosting it somewhere
else right now. Its just a bit of fun really, grabs the first 3 numbers of
your ip, turns that into an rgb color then generates a color pallet.

~~~
eksith
Might I recommend a VPS? Don't worry, I'm not getting comission, but Digital
Ocean has pretty reasonable prices for fun side projects like this. BTW, this
works flawlessly for me on FF, but I wish my colors were prettier though ;)

