public void Validate() { if (!Color.IsColor()) { throw new ArgumentException("Color is not a color", nameof(Color)); } if (!Ambient.IsInUnitRange()) { throw new ArgumentOutOfRangeException(nameof(Ambient)); } if (!Diffuse.IsInUnitRange()) { throw new ArgumentOutOfRangeException(nameof(Diffuse)); } if (!Specular.IsInUnitRange()) { throw new ArgumentOutOfRangeException(nameof(Specular)); } if (!Shininess.IsPositive()) { throw new ArgumentOutOfRangeException(nameof(Shininess)); } }