*template*

5. Hiding in shadows is the ability to blend into dark areas, to
        flatten oneself, and by remaining motionless when in sight, to
        remain unobserved. It is a function of dress and practice.

Hiding in Shadows cannot be accomplished under direct observation.

It can be accomplished with respect to creatures with infravision (q.v.) only if some heat producing light source is near to the creature or to the thief attempting to so hide.
Success makes the thief virtually {invisible} until he or she moves.
Note that spells such as detect invisibility or true seeing will reveal a thief hiding in shadows if such sight is directed towards him or her.


DMG:

Hide In Shadows: As is plainly stated in the PH,
    this is NEVER possible under direct (or even indirect) observation.
If the thief insists on trying,
    allow the attempt and throw dice,
    but don't bother to read them,
    as the fool is as obvious as a cool pile in a ballroom.
Likewise, if a hidden thief attempts movement while under observation,
    the proverbial jig is up for him or her.
Naturally, a creature closely pressed in melee is not likely to bother with looking for some thief not directly in the line of sight,
    but if vision would normally extend to the thief's area of activity,
        then observation rules apply.
Unobserved attempts to hide in shadows must likewise stand the hazard of the dice roll.
A score greater than the required number shows that the character's ability is not on a par with his or her intent,
    and although he or she THINKS hiding has been successful,
    the creature looking in that direction will note a suspicious outline, form, or whatever.
Note also that a thief hiding in shadows is still subject to detection just as if he or she was invisible
(see INVISIBILITY, DETECTION OF INVISIBILITY table).