ドキュメント

Unity Engine

Unity Engine

colorSpace

Indicates the color space that the gradient color keys are using.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前

Definition

  • Type: Property
  • Namespace: UnityEngine
  • Assembly: UnityEngine.CoreModule
public ColorSpace colorSpace { get; set; }

Remarks

Color space setting is automatically set up by the gradient editor, based on GradientUsageAttribute.colorSpace value.
If you are creating gradients from C# code, this value needs to be set manually. Default value assumes that Gradient.colorKeys are expressed in ColorSpace.Gamma sRGB. Set this to ColorSpace.Linear if color keys are expressed as linear values.
Currently only the GradientMode.PerceptualBlend mode needs to know the color space; the value is ignored for other modes.