docs: def get_xy_point_from_rgb(self, red_i, green_i, blue_i):
          """Returns an XYPoint object containing the closest available CIE 1931 x, y coordinates
          based on the RGB input values."""
  
          red = red_i / 255.0
          green = green_i / 255.0
          blue = blue_i / 255.0
  
          r = ((red + 0.055) / (1.0 + 0.055))**2.4 if (red > 0.04045) else (red / 12.92)
          g = ((green + 0.055) / (1.0 + 0.055))**2.4 if (green > 0.04045) else (green / 12.92)
          b = ((blue + 0.055) / (1.0 + 0.055))**2.4 if (blue > 0.04045) else (blue / 12.92)
  
          X = r * 0.664511 + g * 0.154324 + b * 0.162028
          Y = r * 0.283881 + g * 0.668433 + b * 0.047685
          Z = r * 0.000088 + g * 0.072310 + b * 0.986039
  
          cx = X / (X + Y + Z)
          cy = Y / (X + Y + Z)
  
          # Check if the given XY value is within the colourreach of our lamps.
          xy_point = XYPoint(cx, cy)
          in_reach = self.check_point_in_lamps_reach(xy_point)
  
          if not in_reach:
              xy_point = self.get_closest_point_to_point(xy_point)
  
          return xy_point