Get the chart colors.

@param array $labels

@return Collection
177318
protected function getColors(array $labels)
    {
        $colors = Collection::make(array_key_exists('color', $this->options) ? $this->options['color'] : []);

        while ($colors->count() < count($labels)) {
            $colors->push($this->undefinedColor);
        }

        return $colors;
    }
1211358
private static function createHexArray(array $vals)
    {
        foreach ($vals as $r) {
            foreach ($vals as $g) {
                foreach ($vals as $b) {
                    $colors[] = self::rgbToHex($r, $g, $b);
                }
            }
        }
        
        return $colors;
    }
469238
public function getLabelOfName(string $labelName)
    {
        foreach ($this->labels as $label) {
            /** @var GmailLabelInterface $label */
            if ($label->getName() === $labelName) {
                return $label;
            }
        }

        return;
    }
1372689
public function label($label=null){
		if($label){
			$this->label = $label;
		}else{
			return isset($this->label) ? $this->label : $this->name();
		}
	}
637180
public function labels($labels)
    {
        if ($labels instanceof Collection) {
            $labels = $labels->toArray();
        }

        $this->labels = $labels;

        return $this;
    }
634778
protected function formatLabelNames(array $labels)
    {
        if (empty($labels)) {
            return;
        }
        $names = [];

        foreach ($labels as $label) {
            if (!isset($label['name'])) {
                continue;
            }
            $names[] = $label['name'];
        }

        return implode(', ', $names);
    }
359260
protected function getLabelValues(array $labels)
    {
        $values = [];

        foreach ($labels as $label) {
            if ($label instanceof Label) {
                $values[] = $label->value;
            }
        }

        return $values;
    }
1337625
private function buildLabels($labels)
    {
        $collection = [];
        foreach ($labels as $label) {
            $collection[] = Label::createFromData($label);
        }

        return $collection;
    }
857595
public function getDataTables($label = null)
    {
        if ($label !== null) {
            return isset($this->extraTables[$label]) ?
                   $this->extraTables[$label] : array();
        }

        return $this->extraTables;
    }
593177
public static function getLabelName($label)
    {
        if ($label === self::LABEL_OPTIONAL) {
            return 'optional';
        }

        if ($label === self::LABEL_REQUIRED) {
            return 'required';
        }

        if ($label === self::LABEL_REPEATED) {
            return 'repeated';
        }

        return null;
    }
292654
public function compileFrom($labels)
    {
        // first we will check whether we need
        // to reformat the labels from an array
        if (is_array($labels))
        {
            $labels = $this->prepareLabels($labels);
        }

        // every label must begin with a ':' so we need to check
        // and reformat if need be.
        $labels = ':' . preg_replace('/^:/', '', $labels);

        // now we add the default placeholder for this node
        $labels = $this->modelAsNode() . $labels;

        return sprintf("MATCH (%s)", $labels);
    }
95318
public static function getRecordTypeFormChoiceOptions($label = 'Typ:')
    {
        return [
            'label'             => $label,
            'choices'           => array_combine(self::getRecordTypes(), self::getRecordTypes()),
            'choices_as_values' => true,
            'required'          => true,
            'constraints'       => [
                new NotBlank(),
            ],
        ];
    }
1042315
public function setLabel($label)
    {
        if (is_array($label) && $label['icon']) {
            $this->setIcon($label['icon']);
        } elseif (is_string($label)) {
            return $this->setText($label);
        }

        return $this;
    }
1143180
protected function getKeyValueStringsFromLabels(array $labels)
    {
        return array_map(function ($label) {
            if (!$label->isPlain) {
                return sprintf("'%s' => %s", $label->value, $this->getTranslatedTitle($label));
            }

            return sprintf("'%s' => '%s'", $label->value, $label->text);
        }, $labels);
    }
1044873
public function getLabels()
    {
        $result = [];

        $labels = (isset($this->indexReverse[self::LABEL])) ? $this->indexReverse[self::LABEL] : [];

        foreach ($labels as $index) {
            $result[] = $this->getChild($index);
        }

        return $result;
    }
490398
public function setLabelMany($labels, $many)
    {
        $labels->name = __($many);
        $labels->view_items = __('View ' . $many);
        $labels->search_items = __('Search ' . $many);
        $labels->not_found = __('No ' . strtolower($many) . ' Found');
        $labels->not_found_in_trash = __('No ' . strtolower($many) . ' found in Trash');
        $labels->all_items = __('All ' . $many);
        $labels->filter_items_list = __('Filter ' . $many . ' list');
        $labels->items_list_navigation = __($many . ' list navigation');
        $labels->items_list = __($many . ' list');
        $labels->menu_name = __($many);
        return $labels;
    }
1297442
public function setLabels(array $labels = ['k' => 'v'])
    {
        $this->labels = $labels;

        $this->raw = array_merge($this->raw, ['Labels' => $labels]);

        return $this;
    }