I'm currently working on a feature that allows users to select colors using the jQuery minicolor widget. I really like how the color swatch appears inside the widget, but I'm having trouble replicating that same look in a data table. When I try to display a color sample in the table, all I get is a tiny dot instead of a nice rectangle swatch.
Is there a way to achieve a similar visual representation of the selected color in a data table as seen in the minicolor widget?
// Hide all stuffs
$('.rw_widget_colour').addClass('rw_hidden');
// Init minicolors
$('.text').minicolors();
// Set color
$('.colorpicker').minicolors('value', '#2ed1c1');
// Show
$('.rw_widget_colour').removeClass('rw_hidden');
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="http://labs.abeautifulsite.net/jquery-minicolors/jquery.minicolors.css">
<script src="http://labs.abeautifulsite.net/jquery-minicolors/jquery.minicolors.js"></script>
<form class="aui">
<label class="rw_widget_colour">
<div class="rw_widget_swatch">jaoja</div>
<input class="text colorpicker" type="text" name="rw_widget_colour" value="#ff0"/>
</label>
</form>
<!-- Show a swatch: -->
<table>
<tr><td>
<span class="minicolors-swatch minicolors-sprite minicolors-input-swatch">
<span style="background-color: rgb(46, 209, 193);" class="minicolors-swatch-color"></span>
</span>
</td></tr>
</table>