<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

   <xsl:template match="/">
      <xsl:apply-templates select="palette"/>
   </xsl:template>
   
   <xsl:template match="palette">
      <table border="1" cellspacing="0" cellpadding="2">
         <tr>
            <xsl:apply-templates select="color"/>
         </tr>
      </table>
   </xsl:template>

   <xsl:template match="color">
      <td>
         <xsl:attribute name="bgcolor"><xsl:value-of select="."/></xsl:attribute>
         <xsl:value-of select="."/>
      </td>
      <xsl:if test="(position() mod 6) = 0">
         <xsl:text disable-output-escaping="yes">&#13;&#10;&#60;/TR&#62;&#13;&#10;&#60;TR&#62;&#13;&#10;</xsl:text>
      </xsl:if>
   </xsl:template>
   
</xsl:stylesheet>