in reply to Win32::OLE PowerPoint Shapes

My quick look at PPT's help got me this VB example:

With myDocument.Shapes.AddShape(Type:=msoShapeRectangle, _ Top:=144, Left:=144, Width:=72, Height:=72) .Name = "Red Square" .Fill.ForeColor.RGB = RGB(255, 0, 0) .Line.DashStyle = msoLineDashDot End With
Which is not exactly in line with yours, but is close enough for MS work.

What caught my eye is the use of a VB function cleverly called RGB. Referencing the docs, one finds function RGB converts three arguments into a LONG representing the color. Here's a snippet from my VB's immediate window test cases.

print RGB(0,0,0) 0 print RGB(255,255,255) 16777215 print RGB(255,0,0) 255 print RGB(0,255,0) 65280 print RGB(0,0,255) 16711680
This function, at least, seems to perform as documented.

Armed with this knowledge, I constructed a Perl example that strives to curve-fit the MS function.

sub RGB { my ($red,$green,$blue) = @_; return $red + 256 * $green + 65536 * $blue; } print RGB(0,0,0) . "\n"; print RGB(255,255,255) . "\n"; print RGB(255,0,0) . "\n"; print RGB(0,255,0) . "\n"; print RGB(0,0,255) . "\n";
As you can see, the Perl function fits the VB data well within the expected error.
0 16777215 255 65280 16711680
There is no guarantee that our Perl port of VB's RGB function will solve your problem, but it should provide a good jumping-off point.

<Oobject name="tongue" method="in-cheek" comment="intended with best regards =)"/>

--Solo

--
You said you wanted to be around when I made a mistake; well, this could be it, sweetheart.