Você pode utilizar setTimeout()
do JavaScript.
var timer;
$("td").mouseup(function(){
clearTimeout(timer);
// Limpa o timeout
return false;
}).mousedown(function(){
var elemento = this;
// Seta o timeout
timer = window.setTimeout(function() {
// Funciona para <td> que definiu a propriedade backgroundColor
console.log("Clique longo ativado. Cor do background: " + elemento.style.backgroundColor);
}, 1000);
return false;
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<table>
<tbody>
<tr>
<td style="width: 24px; background-color: black;"> </td>
<td><span>black</span> = "#000000"</td>
<td style="width: 24px; background-color: green;"> </td>
<td><span>green</span> = "#008000"</td>
</tr>
<tr>
<td style="width: 24px; background-color: silver;"> </td>
<td><span>silver</span> = "#C0C0C0"</td>
<td style="width: 24px; background-color: lime;"> </td>
<td><span>lime</span> = "#00FF00"</td>
</tr>
</tbody>
</table>