public static Color buttonStateColor( Component c, Color enabledColor, Color disabledColor,
		Color focusedColor, Color hoverColor, Color pressedColor )
	{
		if( c == null )
			return enabledColor;

		if( !c.isEnabled() )
			return disabledColor;

		if( c instanceof AbstractButton ) {
			ButtonModel model = ((AbstractButton)c).getModel();

			if( pressedColor != null && model.isPressed() )
				return pressedColor;

			if( hoverColor != null && model.isRollover() )
				return hoverColor;
		}

		if( focusedColor != null && isFocusPainted( c ) && FlatUIUtils.isPermanentFocusOwner( c ) )
			return focusedColor;

		return enabledColor;
	}
Similar to BasicButtonUI.paint(), but does not use zero insets for HTML text,
which is done in BasicButtonUI.layout() since Java 19.
See https://github.com/openjdk/jdk/pull/8407
and https://github.com/openjdk/jdk/pull/8407#issuecomment-1761583430
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java