in reply to Creative presentation algorithm: IP to a color
An alternative would be to let the r.g.b/24 subnet produce the color. That is simple, direct and irreversable, but still meaningful to the eye.
sub ip2rgb { my @ip = @_; push @ip, (0) x 3; @ip[0..2]; }
That takes the ip quad as a list of octets. The Socket::inet_*() functions can be used to convert address forms.
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Creative presentation algorithm: IP to a color
by Argel (Prior) on Aug 31, 2005 at 00:09 UTC |