Finds the color element and returns its text color for use as default ripple color
@returns {string}
346198
function getElementColor () {
    var items = self.options && self.options.colorElement ? self.options.colorElement : [];
    var elem =  items.length ? items[ 0 ] : self.$element[ 0 ];

    return elem ? self.$window.getComputedStyle(elem).color : 'rgb(0,0,0)';
  }
1126948
private function findColor()
    {
        $code = $this->verifyCode;
        $this->verifyCode = '';

        $color = array_values($this->fontColor);
        $rand = rand(0, count($color) - 1);
        foreach ($this->fontColor as $k => $v) {
            if ($v == $this->fontColor[$rand]) {
                $this->verifyCode .= $code[$k];
            }
        }
        $this->tips = $this->baseColor[$color[$rand]]['tips'];
    }
960785
function(name, value) {
                if (typeof value === "string") {
                    this.color[name] = new Color(value).toRGBA();
                } else {
                    this.color[name] = value.toRGBA();
                }
                return value;
            }
62508
@Pure
	public static int getSelectionColor() {
		final Preferences prefs = Preferences.userNodeForPackage(BusLayerConstants.class);
		if (prefs != null) {
			final String str = prefs.get("SELECTION_COLOR", null); //$NON-NLS-1$
			if (str != null) {
				try {
					return Integer.valueOf(str);
				} catch (Throwable exception) {
					//
				}
			}
		}
		return DEFAULT_SELECTION_COLOR;
	}
632106
function InkRippleCtrl ($scope, $element, rippleOptions, $window, $timeout, $mdUtil, $mdColorUtil) {
  this.$window    = $window;
  this.$timeout   = $timeout;
  this.$mdUtil    = $mdUtil;
  this.$mdColorUtil    = $mdColorUtil;
  this.$scope     = $scope;
  this.$element   = $element;
  this.options    = rippleOptions;
  this.mousedown  = false;
  this.ripples    = [];
  this.timeout    = null; // Stores a reference to the most-recent ripple timeout
  this.lastRipple = null;

  $mdUtil.valueOnUse(this, 'container', this.createContainer);

  this.$element.addClass('md-ink-ripple');

  // attach method for unit tests
  ($element.controller('mdInkRipple') || {}).createRipple = angular.bind(this, this.createRipple);
  ($element.controller('mdInkRipple') || {}).setColor = angular.bind(this, this.color);

  this.bindEvents();
}
443163
function () {

        var nup = false;
        this.isDown = false;

        var i = this.lng;
        while(i--){ 
            if(this.cMode[i]!==0){
                this.cMode[i] = 0;
                this.c[2+i].style.borderColor = this.colors.border;
                nup = true;
            }
        }

        return nup;

    }
832308
function(colorStop) {
			colorStop = normalizeSpace(colorStop);
			
			// find color declaration
			// first, try complex color declaration, like rgb(0,0,0)
			var color = null;
			colorStop = colorStop.replace(/^(\w+\(.+?\))\s*/, function(str, c) {
				color = c;
				return '';
			});
			
			if (!color) {
				// try simple declaration, like yellow, #fco, #ffffff, etc.
				var parts = colorStop.split(' ');
				color = parts[0];
				colorStop = parts[1] || '';
			}
			
			var result = {
				color: color
			};
			
			if (colorStop) {
				// there's position in color stop definition
				colorStop.replace(/^(\-?[\d\.]+)([a-z%]+)?$/, function(str, pos, unit) {
					result.position = pos;
					if (~pos.indexOf('.')) {
						unit = '';
					} else if (!unit) {
						unit = '%';
					}
					
					if (unit) {
						result.unit = unit;
					}
				});
			}
			
			return result;
		}
93856
function findPmiChordsToHighlight() {
      const {
        group: param,
        bin,
        highlight,
        mode: oneBinAllVarsMode,
      } = model.renderState.pmiHighlight;
      if (highlight) {
        svg
          .select('g.pmiChords')
          .selectAll('path.pmiChord')
          .classed('highlight-pmi', false);
      }

      const binMap = {};

      function addBin(pName, bIdx) {
        if (!binMap[pName]) {
          binMap[pName] = [];
        }
        if (binMap[pName].indexOf(bIdx) === -1) {
          binMap[pName].push(bIdx);
        }
      }

      if (oneBinAllVarsMode) {
        svg
          .select('g.pmiChords')
          .selectAll(`path[data-source-name="${param}"]:not(.fade)`)
          .classed('highlight-pmi', highlight)
          .each(function highlightPMI(d, i) {
            const elt = d3.select(this);
            addBin(param, bin);
            addBin(
              elt.attr('data-target-name'),
              Number.parseInt(elt.attr('data-target-bin'), 10)
            );
          });

        svg
          .select('g.pmiChords')
          .selectAll(`path[data-target-name="${param}"]:not(.fade)`)
          .each(function inner(d, i) {
            const elt = d3.select(this);
            addBin(param, Number.parseInt(elt.attr('data-target-bin'), 10));
            addBin(
              elt.attr('data-source-name'),
              Number.parseInt(elt.attr('data-source-bin'), 10)
            );
          });

        if (binMap[param] && binMap[param].indexOf(bin) >= 0) {
          binMap[param] = [bin];
        }

        svg
          .select('g.pmiChords')
          .selectAll(`path[data-target-name="${param}"]:not(.fade)`)
          .classed('highlight-pmi', function inner(d, i) {
            const elt = d3.select(this);
            return (
              binMap[param].indexOf(
                Number.parseInt(elt.attr('data-target-bin'), 10)
              ) >= 0
            );
          });
      } else {
        svg
          .select('g.pmiChords')
          .selectAll(
            `path[data-source-name="${param}"][data-source-bin="${bin}"]:not(.fade)`
          )
          .classed('highlight-pmi', highlight)
          .each(function highlightPMI(d, i) {
            const elt = d3.select(this);
            addBin(param, bin);
            addBin(
              elt.attr('data-target-name'),
              Number.parseInt(elt.attr('data-target-bin'), 10)
            );
          });

        svg
          .select('g.pmiChords')
          .selectAll(
            `path[data-target-name="${param}"][data-target-bin="${bin}"]:not(.fade)`
          )
          .classed('highlight-pmi', highlight)
          .each(function highlightPMI(d, i) {
            const elt = d3.select(this);
            addBin(param, bin);
            addBin(
              elt.attr('data-source-name'),
              Number.parseInt(elt.attr('data-source-bin'), 10)
            );
          });
      }

      return binMap;
    }
897419
private String getHTMLColor(SToken token) {

    if (!markedAndCovered.containsKey(token)) {
      return null;
    }

    /**
     * Since the range in markedAndCovered is from 1 up to 8, we have to
     * decrease the value, for matching the colors in KWIC.
     */
    int color = (int) (long) markedAndCovered.get(token);
    color = Math.min(color > 0 ? color - 1 : color,
            MatchedNodeColors.values().length - 1);

    return MatchedNodeColors.values()[color].getHTMLColor();
  }
697453
function ColorStop() {
    this.parent = null;
    this.beforeNodes = [];
    this.colorNode = null;
    this.separatorNodes = [];
    this.positionNode = null;
    this.warning = null;
    this.parsePosition();
}
27782
function getDisplayHexColor() {
        $colorRole = $this->getColorRole();
        if($colorRole !== null && $colorRole->color > 0) {
            return $colorRole->hexColor;
        }
        
        return null;
    }
228115
private final void loadColorMapRgb() {
        Iterator<String> colorKeys = config.getKeys("highlight");
        if(colorKeys!=null){
            while(colorKeys.hasNext()){
            	String current = colorKeys.next();
          	  String[] splits = current.split("\\.");
          	  if(splits.length > 1){
          		  String val = config.getString(current);
          		  if(val.startsWith("rgb"))
          			  highlightColorMap.put(splits[1].toUpperCase(), val);
          		  else
          			logger.warn("Please check property " +current+ ". The highlight color has to specify RGB values in this format: eg. highlight.find=rgb(255,255,0)");
          	  }     		 
          	  else if(splits[0].equals("highlight")){
        
          		continue;
          	  }
            }
        }

        
        	//default load
      		logger.warn("No RGB property for highlight was provided. Colors set to default.");
        	if(!highlightColorMap.containsKey("find"))		
            	highlightColorMap.put("find".toUpperCase(), load("highlight.find", "rgb(255, 255, 0)", "color for highlight element during finding"));
            if(!highlightColorMap.containsKey("get"))		
            	highlightColorMap.put("get".toUpperCase(), load("highlight.get", "rgb(135, 206, 250)", "color for highlight element during finding"));
            if(!highlightColorMap.containsKey("put"))		
            	highlightColorMap.put("put".toUpperCase(), load("highlight.put", "rgb(152, 251, 152)", "color for highlight element during finding"));
      }
1366843
function() {
        if (!this.quiet()) {
            var prefix = this._callerInfo() + this._getIndent() + "#".magenta.bold;
            var args = argsToArray(arguments).map(function(a) {
                if (typeof a != "string") {
                    a = util.inspect(a);
                }
                return a.toUpperCase().magenta.bold.inverse;
            }).join(" ");
            console.log.call(console, prefix, args);
        }
    }
448816
function findBackgroundColor(element) {
  if (element == null || element instanceof Document) {
    // This element has no background, assume white.
    return 'rgb(255,255,255)';
  }
  // @ts-ignore
  if (element instanceof ShadowRoot) {
    return findBackgroundColor(element.host);
  }
  const backgroundColor = getComputedStyle(element).backgroundColor;
  if (backgroundColor === 'transparent' || backgroundColor === 'rgba(0, 0, 0, 0)') {
    const parent = element.assignedSlot || element.parentNode || element.host;
    return findBackgroundColor(parent);
  } else {
    return backgroundColor;
  }
}
581524
function(){
		var r = 0,
			g = 0,
			b = 0,
			a = 0;

		this.each(function(c){
			r += c.rgb[0];
			g += c.rgb[1];
			b += c.rgb[2];
			a += c.alpha();
		});

		var num = this.colors.length;
		if(num > 0){
			return TColor.newRGBA(r / num, g / num, b / num, a / num);
		}
		return undefined;
	}
932241
function checkColors(name){
  var colors=Object.getOwnPropertyNames(terminal.colors);
  var bul=false; // boolean to control if its defined the property

  for(var i=0; i<colors.length; i++){//iterate over prop names

    if(colors[i] === name){//if it is
      bul=true;
    }
  }
  if(bul!==true){//if its finded the statement of the tag
    terminal.colors[name]=terminal.colors.default;
    } 
}
591258
function getColorRole() {
        $roles = $this->roles->filter(function ($role) {
            return $role->color;
        });
        
        if($roles->count() === 0) {
            return null;
        }
        
        return $roles->reduce(function ($prev, $role) {
            if($prev === null) {
                return $role;
            }
            
            return ($role->comparePositionTo($prev) > 0 ? $role : $prev);
        });
    }