In a dark room, a beam of blue light is shone on a yellow box, what color will the box be?

Black.

Physics books say: "The color of a transparent object is determined by the light that passes through it; an opaque object is determined by the light that is reflected".

The box is supposed to be opaque, and the blue light shines on the yellow box and is absorbed by the box (because the yellow box absorbs all light except for the yellow light, which it does not absorb.) There is no light reflected from the box to the human eye, so people "see" the box as black.