Place this in your script:
!numbers are between 0 and 1. So number 255=1, 100=0.39
RGBPen=REQ("Pen_of_RGB 1 1 1")
POLY2_B 5,7,1,RGBPen,
A/2,B/2,1,
-A/2,B/2,1,
-A/2,-B/2,1,
A/2,-B/2,1,
A/2,B/2,-1
Note: Defines the index of the pen closest to the given color.