public List <Color> buildListOfColorVariations(ProceduralColor inputColor) { List <Color> tempColorList = new List <Color>(); tempColorList.AddRange(generateSaturationVariations(inputColor)); tempColorList.AddRange(generateValueVariations(inputColor)); return(tempColorList); }
public List <Color> generateValueVariations(ProceduralColor inputColor) { List <Color> tempColorList = new List <Color>(); float valueIncrement = Random.Range(inputColor.brightness.x, inputColor.brightness.y) / inputColor.variationCount; for (int i = 1; i < inputColor.variationCount + 1; i++) { tempColorList.Add(setValue(inputColor.color, valueIncrement * i)); } return(tempColorList); }
public List <Color> generateSaturationVariations(ProceduralColor inputColor) { List <Color> tempColorList = new List <Color>(); float saturationIncrement = Random.Range(inputColor.saturation.x, inputColor.saturation.y) / inputColor.variationCount; for (int i = 1; i < inputColor.variationCount + 1; i++) { tempColorList.Add(desaturate(inputColor.color, saturationIncrement * i)); } return(tempColorList); }
public List <Color> GenerateValueVariations(ProceduralColor inputColor, int numberOfVariations) { List <Color> generatedColorList = new List <Color>(); float valueIncrement = Random.Range(inputColor.minBrightnessValue, inputColor.maxBrightnessValue) / inputColor.variationsToGenerate; for (int i = 0; i < numberOfVariations; i++) { generatedColorList.Add(SetLevel(inputColor.color, valueIncrement * i)); } return(generatedColorList); }
public List <Color> GenerateSaturationVariations(ProceduralColor inputColor, int numberOfVariations) { List <Color> generatedColorList = new List <Color>(); float saturationIncrement = Random.Range(inputColor.minSaturation, inputColor.maxSaturation) / inputColor.variationsToGenerate; for (int i = 0; i < numberOfVariations; i++) { generatedColorList.Add(Desaturate(inputColor.color, saturationIncrement * i)); } return(generatedColorList); }
public void BuildListOfColorVariations(ProceduralColor inputColor) { List <Color> tempColorList = new List <Color>(); tempColorList = GenerateSaturationVariations(inputColor, inputColor.variationsToGenerate); outputColors.AddRange(tempColorList); tempColorList = GenerateValueVariations(inputColor, inputColor.variationsToGenerate); outputColors.AddRange(tempColorList); if (addInvertedColor) { outputColors.Add(InvertColor(tempColorList[Random.Range(0, tempColorList.Count)])); } if (addGoldenRatioColor) { outputColors.Add(GoldenRatioColor(inputColor.color)); } }