protected void encodeButton(FacesContext context, ColorPicker colorPicker, String clientId, String value) throws IOException {
ResponseWriter writer = context.getResponseWriter();
writer.startElement("button", null);
writer.writeAttribute("id", clientId + "_button", null);
writer.writeAttribute("type", "button", null);
writer.writeAttribute("class", HTML.BUTTON_TEXT_ONLY_BUTTON_CLASS, null);
renderAccessibilityAttributes(context, colorPicker);
writer.startElement("span", null);
writer.writeAttribute("class", HTML.BUTTON_TEXT_CLASS, null);
writer.write("<span id=\"" + clientId + "_livePreview\" "
+ "style=\"overflow:hidden;width:1em;height:1em;display:block;border:solid 1px #000;text-indent:1em;white-space:nowrap;");
if (value != null) {
writer.write("background-color:#" + value);
}
writer.write("\">Live Preview</span>");
writer.endElement("span");
writer.endElement("button");
}