That’s a tricky point… as soon as you apply non-linear adjustments to the RGB values, the resulting color depends on the colorspace in which the RGB values are defined.
In other words, the same curve gives a different output depending if the RGB values are, say, in sRGB or ProPhoto colorspace. This is both due to the different gamma encoding (ProPhoto has a simple gamma=1.8 TRC, while the sRGB TRC is more complex and is only approximately gamma=2.2) and the different primaries that define the colors that the colorspace can encode…
This is particularly true when curves are applied to individual RGB channels. Here is an example (the image data is in linear encoding just to remove the effect of the different gamma-encoding between sRGB and ProPhoto):
gamma-like curve on RED channel of an sRGB image
the same curve applied to the same image in ProPhoto colorspace

