code: def gamma_correct(cs, c):
      """
      Transform linear RGB values to nonlinear RGB values. Rec.
      709 is ITU-R Recommendation BT. 709 (1990) ``Basic
      Parameter Values for the HDTV Standard for the Studio and
      for International Programme Exchange'', formerly CCIR Rec.
      709. For details see
  
         http://www.poynton.com/ColorFAQ.html
         http://www.poynton.com/GammaFAQ.html
      """
      gamma = cs.gamma
  
      if gamma == GAMMA_REC709:
          cc = 0.018
          if c < cc:
              c = ((1.099 * math.pow(cc, 0.45)) - 0.099) / cc
          else:
              c = (1.099 * math.pow(c, 0.45)) - 0.099
      else:
          c = math.pow(c, 1.0 / gamma)
      return c
  
file_path: vispy/examples/demo/gloo/galaxy/galaxy_specrend.py
imports: import math
label_desc: Use image node_id 6 for calling a global function with example usage: gamma_correct(cs, c) and returns: c