I\'m about to converting RGB color to CMYK for printing purpose.
scale of this conversion is Adobe Photoshop ( Image -> Mode -> CMYK color )
I tried
As I see the theory…
The gamut of CMYK by itself is slightly smaller than RGB, so the difference after straight RGB->CMYK conversion will be easy visible. In order to compensate that diff Color Profiles are used. Color Profile inside is actually a set of color transforms which allows to enlarge the gamut. In this case image source is just a source for these transforms.
CMYK is almost always used with Color Profiles (I mean correct use cases) otherwise color loss will be significant.
In Photoshop try to convert here: Edit -> Convert to Profile. The main difference from your way - you can choose destination CMYK profile and color managment engine including Microsoft ICM, which could give you different results.
Here is a good article about CMYK: http://www.northlight-images.co.uk/article_pages/colour_management/cmyk_for_photographers.html
As for programming...
Maybe it will be easier to use some specialized image processing SDK. Color Management is a basic feature of any of them and should be available even for free.
If you need to estimate how your RGB color will be actually printed you need to use feature called “soft proofing”. This is RGB -> CMYK (with printer profile) -> RGB conversion. In Photoshop you can check it here: View -> Proof Color. You can do the same thing with SDKs.