Google introduced Material 3 which allows the user to choose a color to apply for the whole system theme, but their documentation isn't clear and didn't mention how to get current colors programmatically to use for the app such as changing a view's background color or text color.
E.g.: view.setBackgroundColor(Material3.getPrimaryColor());
Of course Material3.getPrimaryColor() doesn't exist and it is just an example of what I need.
Any help is appreciated, thanks.