Continue with an equally distributed palette if unspecified.
my $hmax = 2 * $dim * 3; # each face of the rgb cube
my $vmax = $dim - 1;
my $smax = $dim - 1;
my $hmax = 2 * $dim * 3; # each face of the rgb cube
my $vmax = $dim - 1;
my $smax = $dim - 1;
+ $rgbval ||= sub { int $_[0] * 255 / $vmax };
+ $greyramp ||= [];
my %greymap; # name => value
my @colmap; # saturation => value => hue => [name, r,g,b]
my %greymap; # name => value
my @colmap; # saturation => value => hue => [name, r,g,b]