in reply to DWIM on sub input

You could always move that out to a subroutine e.g
sub _split_colours { my $color = shift; [ map { s/[^\d.-]//g; $_ ||= 0; $_ < 0 ? 0 : $_ / 255 } (split(/\s*,\s*/, $color, 4), (0) x 3)[0..2] ]; } sub your_subroutine { my($color, ...) = ( _split_colours($_[0]), @_[1 .. $#_] ); ...
Just means that your_subroutine can get on with doing it's thing _split_colours and do the fiddly colour spltting. Just a thought.
HTH

_________
broquaint