rjp74, I've inspected the filter. The script is quite complex, so it's rather difficult to discover the problem fast.
I suppose the main problem of the script is
using pixel values of OUTPUT_WIDTH, OUTPUT_HEIGHT and SIZE in the filter.
While some FF native components use output and filter sizes for some purposes (for example, noises for correct seamless tiling,) they DON'T use pixel values, only relative ones.
On the screenshot below you can see a simple script example which makes different results for the main and the component previews. The explanation is simple: we have different pixel sizes of the previews.
We've got 600x600 main preview and, according to the script formula, 600/200 = 3.0 value in pixel channels.
But the component preview has 96x96 pixel size, so that the pixel channel values there will be 96 / 200 = 0.48 which is much darker than for the main preview.
The solution is to use relative output size, i.e. OUTPUT_WIDTH/SIZE, OUTPUT_HEIGHT/SIZE.