Buckle your seat belt...
This technique requires FCPX 10.2 and above. (95+% of all *filter* effects have this new feature added - exceptions are the default Masks and a few others [Keyer, Luma Keyer, etc] and those that are not editable in Motion).
Add a Color > Tint filter to your clip and turn off the Amount. Add a Color Mask.

Select the color you want to replace in the viewer/storyline. Hold down the shift key and click around to add to the color selection (try to get the edges as close as possible - you can also use the softness slider to help smooth edges, etc.)
You can use as many Shape Masks as you need as a garbage matte -- there's bound to be "bleeding" all through the scene (specular reflections, etc.)
Click on the Tint Color swatch and get the "system color picker". Select the Eyedropper at the bottom of the dialog box (you should probably use the color wheel option). With the eyedropper, select the color you want to replace the color selection.
Dial up the Tint filter's Amount. (Add shape masks as needed: for each one added, click and drag the shape mask BELOW the color mask and change the blend mode as needed -- probably Intersect).
If the color looks too dark, use the same steps in a Color Corrector filter (including the shape masks) and adjust the exposure. Make a simple initial adjustment (any move) then go back out to the Video inspector and drag the Color Corrector OVER the Tint (placing it first in the effect chain), then go back into it and get the adjustment you need.

I colorized spidey's head with the blue from captain america's shield. Scene lighting will affect how that color is shaded when applied. You could try the Hue/Saturation filter to do the same kind of thing. You'll have in-effect control over the application of the color (particularly with the Value parameter). I think Tint will more accurately apply the color as you requested.