You can use BlurPD to change dynamically the colors of objects in Pure Data.
BlurPD system is not for this problem but it contains a good solution for this problem that can be incorporated in your projects.
If you look inside of a module you can see some abstraction that deal with this color problem by calculating the color that you want from RGB directly to Pure Data color system.
Pure Data color system is very strange and interesting.
BlurPD system patch download :
BlurPD.zip
If you need more explanation for how i made the abstractions please let me know. Thanks , i hope this will help you in any way.
BlurPD snapshot: