With regard to hinting to a gentile to perform melachah, as opposed to a direct request – the halachah makes a distinction between two kinds of hints. If the hint is expressed in the form of an instruction, then one may not hint to a non-Jew to do melachah on Shabat. The Gemara gives an example of a person who wants a gentile to extinguish a wick, and says metaphorically, “Clean your nose.” Even though the request was made through an indirect allusion, it is nevertheless forbidden since it was formulated as an instruction.
It is permissible, however, to hint to a gentile by making an observation, without expressing a command or a request. For example, if a person received an important letter on Shabat, he may say, “I can’t read this letter because it is forbidden to open envelopes on Saturday.” The non-Jew will then understand on his own that he should open the envelope for the Jew.
Similarly, if a person wishes to read in a dimly-lit room on Shabat, he may say to a non-Jew, “There isn’t enough light here,” so that the non-Jew will turn on the light. It must be noted, however, that this applies only if there was some light in the room to begin with and the person wanted additional light to allow for comfortable reading. In such cases, one may hint to the gentile to turn on the desired lights, in the manner described. However, if a room is entirely dark, one may not have a gentile turn the lights on for him even if he asks indirectly, through a hint.