It depends what current the LED needs, and what it's fv is.
Say it needs 100mA and the fv is 2V, at 12v the resistor needs to be 100ohm and 1W.
Then if you want dimmer, go bigger, like 200ohm.
Of course if the led ready has a resistor, this needs factoring in.
Resistors run hot if used at the rated power, so you may need to oversize it to keep it cooler.