def linearRGBtoSRGB(color):
  """ Convert a grayscale value (single channel) value from Linear to sRGB """
  # Note that range of input should be 0 to 1
  if color > 1:
    return 1
  elif color < 0.00313:
    return color * 12.92
  else:
    return (((color ** (1/2.4)) * 1.055) - 0.055)