preview color change
778093
function(){
			try {
				this.preview.backgroundColor = this.format.call(this);
			} catch(e) {
				this.preview.backgroundColor = this.color.toHex();
			}
			//set the color for brightness/saturation slider
			this.base.backgroundColor = this.color.toHex(this.color.value.h, 1, 1, 1);
			//set te color for alpha slider
			if (this.alpha) {
				this.alpha.backgroundColor = this.color.toHex();
			}
		}
1127425
def resize_preview(self, dw, dh):
        ""

        # identify preview
        if self._objects_moving:
            id_ = self._objects_moving[0]
            tags = self.canvas.gettags(id_)
            for tag in tags:
                if tag.startswith('preview_'):
                    _, ident = tag.split('preview_')
                    preview = self.previews[ident]
                    preview.resize_by(dw, dh)
                    self.move_previews()
                    break
        self._update_cregion()
667539
def foreground(color, content, readline=False):
    
    return encode(color, readline=readline) + content + encode(DEFAULT, readline=readline)
984860
def preview_text
      res = result
      [label, res.strip] unless res.nil? || res.empty?
    end
25541
def preview(self):
        """"""

        if hasattr(self, '_url'):
            url = self._url + '/preview'
            return self.post(url)
        else:
            url = urljoin(recurly.base_uri(), self.collection_path + '/preview')
            return self.post(url)
315213
def palette_font_and_background_color_toggled(self, settings, key, user_data):
        
        self.settings.styleFont.triggerOnChangedValue(self.settings.styleFont, 'palette')
454224
def _update_color_rgb(self, event=None):
        """"""
        if event is None or event.widget.old_value != event.widget.get():
            r = self.red.get()
            g = self.green.get()
            b = self.blue.get()
            h, s, v = rgb_to_hsv(r, g, b)
            self.hue.set(h)
            self.saturation.set(s)
            self.value.set(v)
            args = (r, g, b)
            if self.alpha_channel:
                args += (self.alpha.get(),)
                self.alphabar.set_color(args)
            hexa = rgb_to_hexa(*args)
            self.hexa.delete(0, "end")
            self.hexa.insert(0, hexa)
            self.square.set_hsv((h, s, v))
            self.bar.set(h)
            self._update_preview()
1102440
function (ui, context) {
					if (context != colorMap) {
						switch (settings.color.mode) {
						case 'h':
							var sv = ui.val('sv');
							colorMap.val('xy', {
								x: sv != null ? sv.s : 100,
								y: 100 - (sv != null ? sv.v : 100)
							}, context);
							break;
						case 's':
						case 'a':
							var hv = ui.val('hv');
							colorMap.val('xy', {
								x: hv && hv.h || 0,
								y: 100 - (hv != null ? hv.v : 100)
							}, context);
							break;
						case 'v':
							var hs = ui.val('hs');
							colorMap.val('xy', {
								x: hs && hs.h || 0,
								y: 100 - (hs != null ? hs.s : 100)
							}, context);
							break;
						case 'r':
							var bg = ui.val('bg');
							colorMap.val('xy', {
								x: bg && bg.b || 0,
								y: 255 - (bg && bg.g || 0)
							}, context);
							break;
						case 'g':
							var br = ui.val('br');
							colorMap.val('xy', {
								x: br && br.b || 0,
								y: 255 - (br && br.r || 0)
							}, context);
							break;
						case 'b':
							var rg = ui.val('rg');
							colorMap.val('xy', {
								x: rg && rg.r || 0,
								y: 255 - (rg && rg.g || 0)
							}, context);
							break;
						}
					}
					if (context != colorBar) {
						switch (settings.color.mode) {
						case 'h':
							colorBar.val('y', 360 - (ui.val('h') || 0), context);
							break;
						case 's':
							var s = ui.val('s');
							colorBar.val('y', 100 - (s != null ? s : 100), context);
							break;
						case 'v':
							var v = ui.val('v');
							colorBar.val('y', 100 - (v != null ? v : 100), context);
							break;
						case 'r':
							colorBar.val('y', 255 - (ui.val('r') || 0), context);
							break;
						case 'g':
							colorBar.val('y', 255 - (ui.val('g') || 0), context);
							break;
						case 'b':
							colorBar.val('y', 255 - (ui.val('b') || 0), context);
							break;
						case 'a':
							var a = ui.val('a');
							colorBar.val('y', 255 - (a != null ? a : 255), context);
							break;
						}
					}
				}
194970
public function preview()
	{
		$selector = 'ctrl_textarea' . $this->id;

		if ($this->canChangeHighlight)
		{
			$strPreview = '<div class="widget" style="padding-top:10px;"><h3 style="margin: 0;"><label>' . $GLOBALS['TL_LANG']['tl_pattern']['highlight'][0] . '</label></h3>';
			$strPreview .= '<select class="tl_select" style="width: 412px;">';
			$strPreview .= '<option value="">-</option><option value="HTML">HTML</option><option value="HTML5">HTML5</option><option value="XML">XML</option><option value="JavaScript">JavaScript</option><option value="CSS">CSS</option><option value="SCSS">SCSS</option><option value="PHP">PHP</option><option value="JSON">JSON</option><option value="Markdown">Markdown</option>';
			$strPreview .= '</select><p title="" class="tl_help tl_tip">' . $GLOBALS['TL_LANG']['tl_pattern']['highlight'][1] . '</p></div>';
		}

		$strPreview .= '<div class="widget" style="padding-top:10px;"><h3 style="margin: 0;"><label>' . $this->label . '</label></h3>';
		$strPreview .= '<textarea id="' . $selector . '" aria-hidden="true" class="tl_textarea noresize" rows="12" cols="80"></textarea>';
		
		$objTemplate = new \BackendTemplate('be_ace');
		$objTemplate->selector = $selector;
		$objTemplate->type = strtolower($this->highlight);
		
		$strPreview .= $objTemplate->parse();
		
		$strPreview .= '<p title="" class="tl_help tl_tip">' . $this->description . '</p></div>';	

		return $strPreview;
	}
876964
function LGraphTexturePreview() {
            this.addInput("Texture", "Texture");
            this.properties = { flipY: false };
            this.size = [
                LGraphTexture.image_preview_size,
                LGraphTexture.image_preview_size
            ];
        }
736033
function revertTitleBarColor() {
    var appView = Windows.UI.ViewManagement.ApplicationView.getForCurrentView();
    if (isWin10UWP && !isBgColorTransparent) {
        appView.titleBar.backgroundColor = titleInitialBgColor;
        appView.titleBar.buttonBackgroundColor = titleInitialBgColor;
    }
}
757782
def _on_click(self, event):
        """"""
        x = event.x
        y = event.y
        self.coords('cross_h', 0, y, self.winfo_width(), y)
        self.coords('cross_v', x, 0, x, self.winfo_height())
        self.event_generate("<<ColorChanged>>")
1088603
def update_color(string, name, style='normal', when='auto'):
    
    clear()
    write_color(string, name, style, when)
485717
protected void getPreviewButtonColor(final String color) {
        Page.getCurrent().getJavaScript().execute(HawkbitCommonUtil.getPreviewButtonColorScript(color));
    }
555274
function Preview() {
    var state = clientStore.getAll();
    var preview = provider.renderPreview(state.selectedKind, state.selectedStory);
    return preview;
  }
784982
public void setText(Preview preview) {
		Point p = this.scrollPaneTable.getViewport().getViewPosition();

		previewTableModel.setPreview(preview);
		SwingUtilities.invokeLater(
			new Runnable(){
				boolean structureChanged = previewTableModel.structureChanged();
				public void run(){
					if(!scrollPaneTable.isVisible())
					{
						topWrapper.remove(scrollPaneText);
						scrollPaneText.setVisible(false);
						topWrapper.add(scrollPaneTable, BorderLayout.CENTER);
						scrollPaneTable.setVisible(true);
						topWrapper.validate();
					}

					if(structureChanged)
					{
						previewTableModel.fireTableStructureChanged();
						rescaleTableColumns();
					}
					else
					{
						previewTableModel.fireTableDataChanged();
					}
					previewTable.repaint();
				}
			}
		);

		this.scrollPaneTable.getViewport().setViewPosition(p);
		this.exportButton.setEnabled(preview != null);
	}
1211469
public static String getColorPickedString(final SpColorPickerPreview preview) {

        final Color color = preview.getColor();
        return "rgb(" + color.getRed() + "," + color.getGreen() + "," + color.getBlue() + ")";
    }