hueMin | Hue mínimo [0..1]. |
hueMax | Hue máximo [0..1]. |
saturationMin | Saturación mínima [0..1]. |
saturationMax | Maximum saturation [0..1]. |
valueMin | Valor mínimo [0..1]. |
valueMax | Valor máximo [0..1]. |
alphaMin | Alpha mínimo [0..1]. |
alphaMax | Alpha máximo [0..1]. |
Color A random color with HSV and alpha values in the (inclusive) input ranges. Values for each component are derived via linear interpolation of value.
Genera un color aleatorio de rangos HSV y alpha.
using UnityEngine;
public class ColorOnClick : MonoBehaviour { void OnMouseDown() { // Pick a random, saturated and not-too-dark color GetComponent<Renderer>().material.color = Random.ColorHSV(0f, 1f, 1f, 1f, 0.5f, 1f); } }