SurfaceGui color is off

Hello!

I’ve been messing with surface guis and noticed that their color doesn’t match the color of a part even if the color property is set to the same value.

RobloxScreenShot20230131_165119761

Would anybody know how to fix this? Keep in mind that the gui has to be shaded and should work both when in light and when not (It is even more off when no lights shine on it).

Thanks!

There’s not really much you are able to do about this, because of how part shading works differently from from SurfaceGui’s.
You could however try experimenting with either the color of the frame itself, or changing some properties about your lighting that may be throwing it off, like any color corrective effects or Specular/Diffuse, or custom ambient colors.
I would bet on adjusting the color of the frame to work the best, because then you can fine tune it to make them nearly perfectly seamless, and you won’t have to change any lighting settings. Part colors will not look exactly like UI colors under normal circumstances due to rendering.

I tried ajusting the color but it only help when it has light shined on it. When there isn’t it looks bad.

Originally, I wanted to use ui for our drawing system. By default we use parts but I tought that it would be better to use 1 part per faces of the mesh and ui before the server unions the part (to reduce the lag).

It could work for the drawing as it is harder to see the difference but with the overlay eraser (we overlay on top of the unions/part to create the effect that you erased).

Would you maybe have some tips to give me on how to make it look better with these technics or another technique?

Would it be possible for you to simply set the BackgroundTransparency of the frame to 1? It would make the frame fully see-through, so you could see only the part beneath. Children of the frame would still be visible, and it could do all the normal things a frame would do, you just wouldn’t be able to see the background.

1 Like

Could you send a screenshot. I don’t really understand how this could be used.

You would change the BackgroundTransparency property to 1 on the Frame inside your SurfaceGui.

Yes but I don’t understand how this could help solve my issue. If the frame is invisible then we wouldn’t be able to see it which wouldn’t change anything.

Why does the frame have to be visible? You are trying to color match to the part, so you are trying to make it not visible anyways. Also, as I stated, contents of the frame would still be visible, we are only changing the background transparency.

No, I’m trying to imitate it being the part. In my case, I want to emulate erasing, so what I would do is for examples, if there is a red part and I want to “erase” it i would put a frame the same color as the part behind the red one to make it look like it has been erased ( a part of it).

SurfaceGui.LightInfluence, Try changing that.

I tried doing that but it still wouldn’t look perfect and it would sometimes mess with lighthing making it even worst in some cases.

If there is a red part you are trying to erase, you are able to code changing part colors. You can also store its previous color in a variable to undo it if that’s why you aren’t doing this already.