public void setCor(Color corUIfundo, Color corLetrasPaineis, Color corUIcampos, Color corLetrasCampos, Color corUIbotoes) { dinheiro.GetComponent <Image>().color = corUIcampos; Text[] textosDinheiro = dinheiro.GetComponentsInChildren <Text>(); textosDinheiro[0].color = corLetrasCampos; textosDinheiro[1].color = corLetrasPaineis; rendimento.GetComponent <Image>().color = corUIcampos; rendimento.GetComponentInChildren <Text>().color = corLetrasCampos; unidades.GetComponent <Image>().color = corUIcampos; Text[] textosUnidades = unidades.GetComponentsInChildren <Text>(); textosUnidades[0].GetComponent <Text>().color = corLetrasCampos; textosUnidades[1].GetComponent <Text>().color = corLetrasPaineis; lucro.GetComponent <Image>().color = corUIcampos; Text[] textosLucro = lucro.GetComponentsInChildren <Text>(); textosLucro[0].GetComponent <Text>().color = corLetrasCampos; textosLucro[1].GetComponent <Text>().color = corLetrasPaineis; Image[] imagensSMA = SMA1.GetComponentsInChildren <Image>(); imagensSMA[0].color = corUIbotoes; imagensSMA[1].color = corUIbotoes; SMA1.GetComponentInChildren <Text>().color = corLetrasPaineis; imagensSMA = SMA2.GetComponentsInChildren <Image>(); imagensSMA[0].color = corUIbotoes; imagensSMA[1].color = corUIbotoes; SMA2.GetComponentInChildren <Text>().color = corLetrasPaineis; imagensSMA = SMA3.GetComponentsInChildren <Image>(); imagensSMA[0].color = corUIbotoes; imagensSMA[1].color = corUIbotoes; SMA3.GetComponentInChildren <Text>().color = corLetrasPaineis; trendLine.GetComponent <Image>().color = corUIbotoes; records.GetComponent <Image>().color = corUIbotoes; _comprar.GetComponent <Image>().color = corUIbotoes; _comprar.GetComponentInChildren <Text>().color = Color.black; _vender.GetComponent <Image>().color = corUIbotoes; _vender.GetComponentInChildren <Text>().color = Color.black; proximo.GetComponent <Image>().color = corUIbotoes; proximo.GetComponentInChildren <Text>().color = Color.black; avancar.GetComponent <Image>().color = corUIbotoes; avancar.GetComponentInChildren <Text>().color = Color.black; trocarTema.GetComponent <Image>().color = corUIbotoes; porcentagemGanho.GetComponent <Image>().color = corUIcampos; porcentagemRendimento.GetComponent <Image>().color = corUIcampos; for (int i = 0; i < paineisFundo.Length; i++) { paineisFundo[i].color = corUIfundo; } Camera.main.backgroundColor = corUIfundo; }