Short answer
Treat the fixed material as the given and the paint as the variable. Establish the material's undertone against a neutral white reference, then work within that temperature family. Paint can be adjusted by any amount; a floor, a worktop or a fireplace cannot, so the fixed element sets the constraint and the paint accommodates it.
Most schemes that feel subtly wrong are undertone conflicts with a fixed material, not bad colour choices. The conflict is hard to spot because both elements can be perfectly pleasant alone and both can be the same lightness — the mismatch is in the hue bias, which is exactly what the eye registers as 'off' without being able to name it. Establishing the material's bias first eliminates that whole class of failure before you look at a single paint colour.
Hold a sheet of plain printer paper directly against it. Oak usually shows yellow-orange; grey porcelain often shows blue; travertine shows a warm cream; many 'grey' laminates show a distinct violet.
Brick, stone, timber and marble are all multi-toned. Step back and judge the average, because the average is what the room actually reads as.
Warm material, warm-leaning wall colour. This is not the same as matching the colour — a warm grey works perfectly well with oak, where a pink-grey of the same lightness often does not.
Stand the sample board on the floor, against the worktop, or against the fireplace. Never judge from a chart held at eye level.
If the fixed material has a strong colour — terracotta, red brick, a green marble — picking up a muted version of that colour elsewhere in the room usually reads better than pretending the material is neutral.
Be careful with strongly figured natural materials — marble, granite, heavily grained timber. Their colour changes across the surface, so a paint chosen against one part of them can conflict with another. Choose against the overall impression at normal viewing distance.
How to test it
Bring the sample board to the material rather than the other way round, and view both from where you normally stand in the room. A worktop judged from directly above and a worktop seen from across the kitchen are two different colours.
Undertone
This is the whole point of the exercise. A material and a paint can share a lightness and a broad colour name and still conflict, purely because one leans yellow and the other leans pink.
Lighting
Fixed materials are lit differently from walls — floors receive reflected light from below and worktops sit under task lighting. Judge the pairing where each element actually sits, not on a table.
Finish
The material's own finish matters as much as the paint's. Polished stone reflects surrounding colour strongly and will pick up the wall colour; a honed or matt surface will not.
Whatever a calculation or a chart says, view a physical sample in the actual location before committing to a large surface.
Colourwise editorial guidance, drawn from conventional decorating practice and from the physical behaviour of light and surfaces described in the linked lighting and finish guides. Not manufacturer advice — always follow the specific instructions supplied with any product you use.