Search Unity

Question Help Understanding Constructor of Color - Linear or Gamma

Discussion in 'Visual Scripting' started by alfredo8barc, Jan 22, 2023.

  1. alfredo8barc

    alfredo8barc

    Joined:
    Jan 22, 2023
    Posts:
    2
    Hello everyone,

    in my C# script I am creating colors with the use of Color for my Materials. However my wished colors were originally given in XYZ and therefore had to convert them to sRGB. During the conversion to obtain “linear” RGB values, is it customary to apply a gamma correction to result sRGB values.

    Nevertheless I am confused wether the Constructor Color() wants the RGB values linear or gamma corrected. I am happy for any hints!

    So far I only found under Edit > Project Settings > Player > Other Settings > Rendering > Color Space that there is an option to change the workflow between Linear and Gamma. Does it depend on that?

    I'm also new to unity and appreciate helpful answers.
     
  2. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,068
    alfredo8barc likes this.