Set the color of the upper frame to the background color of the reftrack status

        :param index: the index
        :type index: :class:`QtGui.QModelIndex`
        :returns: None
        :rtype: None
        :raises: None
428211
def set_top_bar_color(self, index):
        
        dr = QtCore.Qt.ForegroundRole
        c = index.model().index(index.row(), 8, index.parent()).data(dr)
        if not c:
            c = self.upper_fr_default_bg_color
        self.upper_fr.setStyleSheet('background-color: rgb(%s, %s, %s)' % (c.red(), c.green(), c.blue()))
1042671
def set_palette(self, background, foreground):
        
        palette = QPalette()
        palette.setColor(QPalette.Base, background)
        palette.setColor(QPalette.Text, foreground)
        self.setPalette(palette)

        # Set the right background color when changing color schemes
        # or creating new Editor windows. This seems to be a Qt bug.
        # Fixes Issue 2028 and 8069
        if self.objectName():
            style = "QPlainTextEdit#%s {background: %s; color: %s;}" % \
                    (self.objectName(), background.name(), foreground.name())
            self.setStyleSheet(style)
1255315
def setCurrentIndex(self, index):
        
        if self._currentIndex == index:
            return

        self._currentIndex = index
        self.currentIndexChanged.emit(index)

        for i, item in enumerate(self.items()):
            item.setMenuEnabled(i == index)
        self.repaint()
394134
function(ui)
              {
                try
                {
                  var all = ui.val('all');
                  activePreview.css({ backgroundColor: all && '#' + all.hex || 'transparent' });
                  setAlpha.call($this, activePreview, all && Math.precision((all.a * 100) / 255, 4) || 0);
                }
                catch (e) { }
              }
124248
public void setTrackColor(ColorStateList stateList) {
        mTrackStateList = stateList;
        mTrackColor = mTrackStateList.getDefaultColor();
        if (mAlpha < 255) {
            mCurTrackColor = Ui.modulateColorAlpha(mTrackColor, mAlpha);
        } else {
            mCurTrackColor = mTrackColor;
        }
    }
952288
def editColor( self, item, index ):
        
        if ( not index ):
            return
            
        newcolor = QColorDialog.getColor(item.colorAt(index-1), self)
        
        if ( not newcolor.isValid() ):
            return
            
        endIndex = index + 1
        if ( self.propogateRight() ):
            endIndex = self.columnCount()
        
        for i in range(index, endIndex):
            item.setColorAt(i-1, newcolor)
1356498
def get_bgcolor(self, index):
        """"""
        value = self.get_value(index)
        if index.column() < 3:
            color = ReadOnlyCollectionsModel.get_bgcolor(self, index)
        else:
            if self.remote:
                color_name = value['color']
            else:
                color_name = get_color_name(value)
            color = QColor(color_name)
            color.setAlphaF(.2)
        return color
974467
function (ui, context) {
					var hex = ui.val('hex');
					currentPreview.css({
						backgroundColor: hex && '#' + hex || 'transparent'
					});
					setAlpha.call($this, currentPreview, mPrecision(((ui.val('a') || 0) * 100) / 255, 4));
				}
28427
public void fadeToLayer(int index) {
    mTransitionState = TRANSITION_STARTING;
    Arrays.fill(mIsLayerOn, false);
    mIsLayerOn[index] = true;
    invalidateSelf();
  }
861717
def set_index(self, index):
        
        item = index.internalPointer()
        note = item.internal_data()
        self.content_lb.setText(note.content)
        self.created_dte.setDateTime(dt_to_qdatetime(note.date_created))
        self.updated_dte.setDateTime(dt_to_qdatetime(note.date_updated))
        self.username_lb.setText(note.user.username)
397964
def color(cls, value):
        """"""
        index = bisect(cls.breakpoints, value)
        return colors.fg(cls.colors_[index])
1001916
def on_transparency_value_changed(self, hscale):
        
        value = hscale.get_value()
        self.prefDlg.set_colors_from_settings()
        self.settings.styleBackground.set_int('transparency', MAX_TRANSPARENCY - int(value))
212254
def set_color(self, ipaddr, hue, sat, bri, kel, fade):
        
        cmd = {"payloadtype": PayloadType.SETCOLOR,
               "target": ipaddr,
               "hue": hue,
               "sat": sat,
               "bri": bri,
               "kel": kel,
               "fade": fade}

        self._send_command(cmd)
1161705
public final void setCheckedStateBackgroundColor(@ColorInt int backgroundColor) {
        if ((backgroundColor != mCheckedBackgroundColor) &&
            (null != mCheckedBackgroundPaint)) {
            mCheckedBackgroundPaint.setColor(backgroundColor);
            if (isChecked()) {
                invalidate();
            }
        }

        mCheckedBackgroundColor = backgroundColor;
    }
37840
private void setLineColor(@ColorInt final int color) {
        view.getBackground().setColorFilter(color, PorterDuff.Mode.SRC_ATOP);
    }
319587
def set_root(self, index):
        
        if not index.isValid():
            self.setModel(None) # so we will not see toplevel stuff
            self.setCurrentIndex(QtCore.QModelIndex())
            self.new_root.emit(QtCore.QModelIndex())
            return
        if self.model() != index.model():
            self.setModel(index.model())
        self.setRootIndex(index)
        if self.model().hasChildren(index):
            self.setCurrentIndex(self.model().index(0, 0, index))
            self.new_root.emit(self.model().index(0, 0, index))
        else:
            self.new_root.emit(QtCore.QModelIndex())
770318
def set_color(index, color):
    """"""
    if OS == "Darwin" and index < 20:
        return "\033]P%1x%s\033\\" % (index, color.strip("#"))

    return "\033]4;%s;%s\033\\" % (index, color)