code: protected void closePopup() {
  
          if (m_previewHandlerRegistration != null) {
              m_previewHandlerRegistration.removeHandler();
          }
          m_previewHandlerRegistration = null;
          CmsColorSelector picker = (CmsColorSelector)m_popup.getWidget(0);
          if (checkvalue("#" + picker.getHexColor().toUpperCase())) {
              m_popup.hide();
          }
  
      }
docs: Close the popup and store the color value in the colorvalue field.<p>