A colour copied as text becomes a swatch you can see, and copied code shows in colour with its language named.

Built into Ledge for macOS.
#6E7BF2 or rgb(110, 123, 242) fills its card with that colour, with its RGB values underneath.
Copied code shows in a fixed-width font with Xcode's colours, and its card names the language.
Each preview has its own switch, and colours without a # can count too.