But this is not feasible because I cannot predict all possible color names. What I tried: For hex strings, I wrote this helper: static Color hex(String hexColor ...