Help Setting Mouse Hover and Keyboard Focus to the same color

Godot Version

v4.5.1.stable.official [f62fdbde1]

Question

Hi all!

I am attempting to override hover and focus themes for Godot buttons. For each button I set the theme overrides of focus and hover to a custom “hover_copy.tres”. It seems however that Godot alters this theme a bit on mouse hover. As seen in the image, the ‘Fight’ button that is hovered over is lighter than the ‘Magic’ button with the current keyboard focus.

Additionally, when both keyboard focus and hover are stacked the color is yet again different.

Worse still when I print out the colors with the code seen below everything is the same color.

print(get_theme_color("font_hover_color", "Button"))
print(get_theme_color("font_focus_color", "Button"))

Is there away to adjust this? Is this just expected behavior? Do I have any other options besides making my own buttons? What am I missing?

Note - While barely visible you can see the default color or two buttons just at the edge of the ‘Fight’ and ‘Magic’ buttons.

If you need more information, please let me know. Any help is greatly appreciated, thanks in advance.

The fonts are both the same color f2f2f2, do you mean the stylebox?

Ooops, good catch! However printing out

		var hover_sb = get_theme_stylebox("hover", "Button")
		var focus_sb = get_theme_stylebox("focus", "Button")

		print("hover:", hover_sb)
		print("focus:", focus_sb)

I get

hover:<StyleBoxFlat#-9223372010363550458>
focus:<StyleBoxFlat#-9223372010313218807>
hover:<StyleBoxFlat#-9223372010363550458>
focus:<StyleBoxFlat#-9223372010313218807>
hover:<StyleBoxFlat#-9223372010363550458>
focus:<StyleBoxFlat#-9223372010313218807>
hover:<StyleBoxFlat#-9223372010363550458>
focus:<StyleBoxFlat#-9223372010313218807>

However, like I mentioned these have the exact same .tres file, so it looks like Godot is changing/modifying it?

Yeah seems like it is a different resource somehow, maybe “Local to Scene” is set. You could also print the .bg_color for the box’s main color.

Alright, well I’m stupid. Sorry to waste your time. The buttons had alpha, the background is a gradient. Ergo they’re going to be different colors because they’re in a different position.

Thank you for your help.