If you have a reference to the widget in your C++ you can just set the color / opacity like the following. Code snippet that sets buttons active / inactive in C++.
// color and opacity constants
const FLinearColor ACTIVE_BUTTON_COLOR = FLinearColor(1, 1, 1, 1);
const FLinearColor INACTIVE_BUTTON_COLOR = FLinearColor(1, 1, 1, 0.333f);
UButton* _Button_Tool_01; // need reference to it
// set the color
_Button_Tool_01->SetBackgroundColor(INACTIVE_BUTTON_COLOR);
In your case you would tick a timer and change the color over time.