I tried this refinement, but doing it in xy coordinates lead to that the C an Y became slightly greenish.Perhaps the trick is to measure the XYZ of the RGB, add them together, then compute the x,y from the sum. x = X/(X+Y+Z) y = Y/(X+Y+Z)
Then I tried to minimize distance between measured CMY coordinates and computed in the XYZ space (such as C_X = G_X+B_X, etc.) and that worked better. Black to RGBCMY gradients were clear without notable tinting, also desaturion of RGBCMY has not produced notable hue change.