Copying to clipboard

I was wondering if there was a way to for example have an interaction where if i select a particular color, that hex code could be quickly copied to clipboard in preview mode to make it easy for designers and devs to get colors from a style guide?