How are you "inserting" this. As an object into a container field? As a File? Are you sure that you've set this up in exactly the same way on the other layout?
I'm inserting an object [Paintbrush picture] into a container.
Everything is the same as far as I can tell. The one layout is a list but I don't see why that should make a difference. And the script I'm using is identical. This was the easiest way I could find to change the colour of a field but now it's not working to plan. :(
Simplest way to change the color of a field (if you are not using Instant Web Publishing) is to select a fill color for a field while in layout mode if you always want this field the same color. If you want it to change based on other values, you can set up a conditional format the controls what fill color will be applied.
In a few cases, a container field still makes sense. When I've needed this, I've simply entered layout mode, drawn a rectangle of the desired color and then copied this rectangle to my clipboard. I return to browse mode, put my cursor in the container field and paste. There are data formatting options you can use so that the pasted rectangle fills the container no matter how it is re-sized.