CSS > Hex color

/#(?:[0-9A-Fa-f]{3}){1,2}\b/

Pick a regex from the menu or try your own in the debugger.

Open Debugger