substring conversion (in Haskell). Can you beat this?
Perl, 44 chars

Two different tweaks can get it to this length, one suggested by Primo:

s/#\K[\da-f]{6}/sprintf"%06x",~hex ff.$&amp;/eg


Another one by playing around with the /ee modifier:

s/#\K[\da-f]{6}/"sprintf'%06x',~0xff$&amp;"/eeg


Requires -p command line switch (1 char included in count).

Works for lower-case hex numbers (as in example).  An i switch added to the regex would make it work for upper-case as well (though not preserving the case of the original number).