my $n = ($x * 2**24) + ($y * 2**16) + ($z * 2**8) + 0x40; $rect->set('fill-color-rgba' => $n);