I assume that you’re selecting the shape and then, if this shape were created in InDesing, double clicking the color icon (the one at the bottom of the tool bars, on the left, that represents the filler color) and then typing the values to finally accept them.
If the shape or color has been created in some other software, it should be edited in that software. As an example, if the shape were created in Illustrator, you’d probably imported it as a smart object and you could double click it and it would automatically open Illustrator for edition. Closing Illustrator will cause the changes to be updated in InDesign.
Do also remember that what you see on the screen may not be the real color if the monitor is not calibrated