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
In reply to Re: Creative presentation algorithm: IP to a color
by Zaxo
in thread Creative presentation algorithm: IP to a color
by Your Mother
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |