0

Update

Since browsers prohibit it, I'm going to leave it. It's no big deal. Thanks!

  • Duplicate of [this question](http://stackoverflow.com/questions/400212/how-to-copy-to-the-clipboard-in-javascript) ? – Rob I Jul 31 '12 at 20:18
  • You can use [jQuery to get the hex code of your background color](http://stackoverflow.com/questions/638948/background-color-hex-to-javascript-variable-jquery) & [copy it to the Clipboard on click using javascript](http://stackoverflow.com/questions/7713182/copy-to-clipboard-for-all-browsers-using-javascript) ([take a look here too](http://stackoverflow.com/questions/400212/how-to-copy-to-the-clipboard-in-javascript)) to achieve your goal. – amiregelz Jul 31 '12 at 20:18
  • 1
    or Duplicate of http://stackoverflow.com/questions/6355300/copy-to-clipboard-without-flash – nicosantangelo Jul 31 '12 at 20:20
  • Tried those, didn't work. The only option would be to use Flash so no problem, it's not a big deal if I don't use it. Thanks! –  Jul 31 '12 at 20:27

1 Answers1

0

Sorry, there's no universal browser-only solution for this. The browser security model explicitly prohibits access to local client's clipboard (though some browsers, like Netscape, have ways around that).

Using a non-browser code (like flash or similar methods) is the only way to do it in a cross-browser implementation.

YePhIcK
  • 5,425
  • 2
  • 22
  • 47
  • I get ya, I thought it was possible but seems not, no worries, thanks anyway! –  Jul 31 '12 at 20:26