BLOCK3: # 18 = (6 "diluted" hues) * (3 shades) for my $h ( 0 .. $#hues ) { for my $s ( 1 ..$#shades - 1 ) { $dest-> colorAllocate( map { ( 1 + $s * ( $_ - 1 ) / $#shades ) * 255 } ( 0 <= $h <= 1 || $h == 5 ), # R ( 1 <= $h <= 3 ), # G ( 3 <= $h <= 5 ) # B ); push @chars, colored( $shades[ $s ], "$hues[ $h ] on_white" ) } }