It's hard to imagine any graphics application without a Dropper tool (often also called color picker). In Inkscape, you simply select an object, select the Dropper tool, and click anywhere on canvas to assign the color under the cursor to the object fill (or stroke if you hold Shift while clicking). This works as expected if the object you are picking from is fully opaque.
There are more options when picking the color from a partially transparent object and this is what we will investigate in this recipe.
Having the Fill and Stroke dialogue window open helps with tracking how different Dropper tool options interact with object opacity so make sure you open it (Shift + Ctrl + F).