code: private void previewButtonClicked() {
          if (!tagPreviewBtnClicked) {
              colorPickerLayout
                      .setSelectedColor(ColorPickerHelper.rgbToColorConverter(ColorPickerConstants.DEFAULT_COLOR));
          }
  
          tagPreviewBtnClicked = !tagPreviewBtnClicked;
          colorPickerLayout.setVisible(tagPreviewBtnClicked);
      }
docs: Open color picker on click of preview button. Auto select the color based
  on target tag if already selected.