CThumbCreator fill with colors other than black

The CThumbCreator extension will fill your picture with a black background if the $thumb->square is set to true.

I need to modify the extension so that I can set the color. I tried,

$colorStorage = imagecolorallocate($this->tmp, 255, 255, 255);

as a test, but this made the whole image white. Does anyone know how to do what I’m asking?