RGB to Philips X and Y

I know it sounds kind of silly but I’m making a way to control my lights in Roblox. For the lights, It uses HSV and Phillips X, and Y to control the colors. I’ve looked far and wide for a solution to go from an RGB to Phillips X and Y but I can’t find any, is there any way I could do it myself?