I have a Feature Collection consisting of features having id, color_code, etc as attributes. I have to render this feature with the color in the color_code attribute. Is this possible and please suggest some links?
Yes, it's possible. You should build and use a renderer, probably a unique value renderer.
Before adding your feature layer to a map, loop through your features and build symbols from your color codes and add them to a renderer. Then use setRenderer to specify your renderer for your layer. The unique value renderer sample will probably be helpful.