private int getIndexForColorScheme(ColorScheme colorScheme) { ColorScheme orange = new ColorScheme(Primary.Orange800, Primary.Orange500, Primary.Orange900, Accent.Yellow200, TextShade.WHITE); ColorScheme blueGray = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE); ColorScheme blue = new ColorScheme(Primary.Blue800, Primary.Blue500, Primary.Blue900, Accent.Purple200, TextShade.WHITE); ColorScheme green = new ColorScheme(Primary.Green800, Primary.Green500, Primary.Green900, Accent.Yellow200, TextShade.WHITE); ColorScheme red = new ColorScheme(Primary.Red800, Primary.Red500, Primary.Red900, Accent.Orange200, TextShade.WHITE); if (colorScheme.Equals(orange)) { return(0); } else if (colorScheme.Equals(blueGray)) { return(1); } else if (colorScheme.Equals(blue)) { return(2); } else if (colorScheme.Equals(green)) { return(3); } else if (colorScheme.Equals(red)) { return(4); } return(0); }