RGB to xy first divide by 255.
RGB to xy first divide by 255.

In the conversion from RGB to xy you schould first devide the integer by 255.
This is stated in the philips hue conversion method https://developers.meethue.com/develop/application-design-guidance/color-conversion-formulas-rgb-to-xy-and-back/
"1. Get the RGB values from your color object and convert them to be between 0 and 1. So the RGB color (255, 0, 100) becomes (1.0, 0.0, 0.39)"
benknight/hue-python-rgb-converter