So like a Jello mold with the core being deep red and that fades to the outer color of green? (how festive!)
I haven’t tried any of these but…
1) What if you apply a fresnel effect to the transparency of the inner object so that its edge just sort of fades away. If you make both the outer object and inner object the same RI you shouldn’t sere that transition (I haven’t tried this but it would work in a physical sense in the real world)
2) What if instead of doing it with the color of the material you do it with light. Put a light in the center of the object that has a distance fall off that is not quite the edge of the object and have that light red, and then have lights surrounding the object that are green with fall offs that don’t reach the core. You could make all these non specular lights (so you don’t get a bunch of highlights) and then do some studio lighting with just spec hilight lights where you want them. These studio lights would not add to the brightness of the object, just the highlight.
If this creates an object that is too evenly lit you could use additional white lights with negative values to reduce light in some areas.
3) I haven’t tried using the subsurface scattering effect with a transparent object but that might work as well using a modified version of idea #2
4) You could try a 3D noise with a really big scale and a blob of one color of the noise being the size of the core and the rest of the noise being the other color. So mapped to a flat the noise would look like a grad from one color to the other.
5) What about a pyrocluster shader but invert the puffy gradient so edges are sharp. And use two different colors within that “puff”.
6) Depending on shape of object, you can often put a card behind the object that is a grad of the colors you want and have the gel object refract the card through it. The card would always face camera and always be on the back side of the object. We use this trick to get just the right look to full coke bottles. Sometimes you can put a compositing tag on the card and have it not be seen by the camera and only be the refraction and transparency.