How to randomly receive a Material Design Color?
问题 Google has their Color - Guidelines, so how to randomly receive a color? Is there a way to specify a number from the table and receive a random color out of all colors of the table? For example getMatColor(100); : EDIT - Result: (Icon colors) 回答1: Better late than never. My new response if the real purpose is to get a random material color for a type of color. Add the array.xml file (from @8m47x) <?xml version="1.0" encoding="utf-8"?> <resources> <array name="mdcolor_50"> <item name="red_50"