I am building a HarmonyOS application and want to load color values that I have placed in the resources folder in resources/base/element/color.json
. How can I load this color in my Java class?
In Android we can use the getColor()
function for this:
context.getResources().getColor(R.color.colorID);
What is the alternative for this in HarmonyOS?