original_docstring: Transform from xyz to rgb representation of colour.
  
          The output rgb components are normalized on their maximum
          value. If xyz is out the rgb gamut, it is desaturated until it
          comes into gamut.
  
          By default, fractional rgb components are returned; if
          out_fmt='html', the HTML hex string '#rrggbb' is returned.
  
          
docstring: Transform from xyz to rgb representation of colour.
  The output rgb components are normalized on their maximum
  value. If xyz is out the rgb gamut, it is desaturated until it
  comes into gamut.
  
  By default, fractional rgb components are returned; if
  out_fmt='html', the HTML hex string '#rrggbb' is returned.
docstring_tokens: Transform from xyz to rgb representation of colour . The output rgb components are normalized on their maximum value . If xyz is out the rgb gamut it is desaturated until it comes into gamut . By default fractional rgb components are returned ; if out_fmt = ' html ' the HTML hex string ' #rrggbb ' is returned .
code: def xyz_to_rgb(self, xyz, out_fmt=None):
          """Transform from xyz to rgb representation of colour.
  
          The output rgb components are normalized on their maximum
          value. If xyz is out the rgb gamut, it is desaturated until it
          comes into gamut.
  
          By default, fractional rgb components are returned; if
          out_fmt='html', the HTML hex string '#rrggbb' is returned.
  
          """
  
          rgb = self.T.dot(xyz)
          if np.any(rgb < 0):
              # We're not in the RGB gamut: approximate by desaturating
              w = - np.min(rgb)
              rgb += w
          if not np.all(rgb==0):
              # Normalize the rgb vector
              rgb /= np.max(rgb)
  
          if out_fmt == 'html':
              return self.rgb_to_hex(rgb)
          return rgb
code_tokens: def xyz_to_rgb ( self , xyz , out_fmt = None ) : rgb = self . T . dot ( xyz ) if np . any ( rgb < 0 ) : w = - np . min ( rgb ) rgb += w if not np . all ( rgb == 0 ) : rgb /= np . max ( rgb ) if out_fmt == 'html' : return self . rgb_to_hex ( rgb ) return rgb
short_docstring: Transform from xyz to rgb representation of colour.
short_docstring_tokens: Transform from xyz to rgb representation of colour .
comment: """Transform from xyz to rgb representation of colour.
  
          The output rgb components are normalized on their maximum
          value. If xyz is out the rgb gamut, it is desaturated until it
          comes into gamut.
  
          By default, fractional rgb components are returned; if
          out_fmt='html', the HTML hex string '#rrggbb' is returned.
  
          """$SEP$# We're not in the RGB gamut: approximate by desaturating
  $SEP$# Normalize the rgb vector
  