Reads the color codings of the subtasks.
@return array of color codings, one for each subtask
359168
private Color[] getColorCodings(ALTaskThread thread) {
    	if (thread == null) {
    		return null;
    	}
    	
    	ALMainTask task = (ALMainTask) thread.getTask();
    	
    	List<ALTaskThread> subtaskThreads = task.getSubtaskThreads();
    	
    	if (subtaskThreads.size() == 0) {
    		// no hierarchical thread, e.g. ALPrequentialEvaluationTask
    		return new Color[]{task.getColorCoding()};
    	}
    	
    	
    	if (task.getClass() == ALPartitionEvaluationTask.class) {
    		// if the task is a cross validation task, it displays the mean
    		// over the underlying params. The color coding therefore 
    		// corresponds to the color coding of each of its subtasks.
    		return getColorCodings(subtaskThreads.get(0));
    	}
    	
    	Color[] colors = new Color[subtaskThreads.size()];
    	for (int i = 0; i < subtaskThreads.size(); i++) {
    		ALMainTask subtask = (ALMainTask) subtaskThreads.get(i).getTask();
    		colors[i] = subtask.getColorCoding();
    	}
    	return colors;
    }
374420
private void readTasks()
   {
      Integer rootID = Integer.valueOf(1);
      readWBS(m_projectFile, rootID);
      readTasks(rootID);
      m_projectFile.getTasks().synchronizeTaskIDToHierarchy();
   }
31786
private int[] changeColor() {
        int[] changedPixels = new int[pixels.length];
        double frequenz = 2 * Math.PI / 1020;

        for (int i = 0; i < pixels.length; i++) {
            int argb = pixels[i];
            int a = (argb >> 24) & 0xff;
            int r = (argb >> 16) & 0xff;
            int g = (argb >> 8) & 0xff;
            int b = argb & 0xff;

            r = (int) (255 * Math.sin(frequenz * r));
            b = (int) (-255 * Math.cos(frequenz * b) + 255);

            changedPixels[i] = (a << 24) | (r << 16) | (g << 8) | b;
        }

        return changedPixels;
    }
376065
public List<Color> listColors() {
        String url = WxEndpoint.get("url.card.colors.get");
        logger.debug("list colors.");
        String response = wxClient.get(url);
        ColorWrapper colorWrapper = JsonMapper.defaultMapper().fromJson(response, ColorWrapper.class);
        return colorWrapper.getColors();
    }
489094
def check_colors
        each_column {|c,i|
          if c.color || c.bgcolor || c.attrib
            @_check_coloring = true
            return
          end
          @_check_coloring = false
        }
      end
1242316
public function read() : array
    {
        if (!$this->weights or !$this->biases) {
            throw new RuntimeException('Layer has not been initialized');
        }

        return [
            'weights' => clone $this->weights,
            'biases' => clone $this->biases,
        ];
    }
1099602
private int[] buildVertexColor() {
        int[] color = new int[g.length];

        int n = 1;
        Arrays.fill(color, -1);
        for (long cycle : cycles) {
            for (int i = 0; i < g.length; i++) {
                if ((cycle & 0x1) == 0x1) color[i] = color[i] < 0 ? n : 0;
                cycle >>= 1;
            }
            n++;
        }

        return color;
    }
225925
public function getReplaces()
    {
        return [
            "<header>" => Colors::COLOR_FGL_WHITE . Colors::FONT_BOLD,
            "</header>" => Colors::RESET,

            "<highlight>" => Colors::COLOR_FGL_YELLOW . Colors::FONT_BOLD,
            "</highlight>" => Colors::RESET,

            "<warn>" => Colors::COLOR_FG_RED,
            "</warn>" => Colors::RESET,

            "<info>" => Colors::COLOR_FGL_BLUE,
            "</info>" => Colors::RESET,

            "<error>" => Colors::COLOR_BG_RED . Colors::COLOR_FGL_WHITE,
            "</error>" => Colors::RESET
        ];
    }
239386
private static function extractColorAndOptions($colorCode)
    {
        $options = array();
        foreach (self::$options as $name => $bit) {
            if (($colorCode & $bit) === $bit) {
                $options[] = self::$codes[$bit];
                $colorCode = $colorCode & ~$bit;
            }
        }
        if (!isset(self::$codes[$colorCode])) {
            throw new ConsoleException("Cannot parse color code");
        }
        return array(self::$codes[$colorCode], $options);
    }
1312695
public function getContrastColor()
    {
        // if there is a code...
        if (!is_null($this->XTermCode)) {

            // check to see if the code is in the array of colors that need white
            if (in_array($this->XTermCode,Colors::$needsWhite256)) {

                // return a new copy of the color object initialized to white
                return new self("white");

            // then it needs black
            } else {

                // return a new copy of the color object initialized to black
                return new self("black");
            }

        // the code is null
        } else {

            // return black as a default
            return new self("black");

        }
        
    }
574887
private function initializeColors()
    {
        $rgb = $this->hex2rgb($this->get('background_color'));
        $this->set('background_color', imagecolorallocate($this->image, $rgb[0], $rgb[1], $rgb[2]));

        $rgb = $this->hex2rgb($this->get('text_color'));
        $this->set('text_color', imagecolorallocate($this->image, $rgb[0], $rgb[1], $rgb[2]));

        $rgb = $this->hex2rgb($this->get('success_color'));
        $this->set('success_color', imagecolorallocate($this->image, $rgb[0], $rgb[1], $rgb[2]));

        $rgb = $this->hex2rgb($this->get('failure_color'));
        $this->set('failure_color', imagecolorallocate($this->image, $rgb[0], $rgb[1], $rgb[2]));
    }
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'];
    }
1282171
public function getSubProcessorCodes()
    {
        $codes = [];
        foreach ($this->subProcessors->getIterator() as $code => $object) {
            $codes[] = $code;
        }

        return $codes;
    }
661711
public function get_rgba_css() {

		$colors = array();

		foreach ( $this->colors as $name => $args ) {

			if ( ! empty( $name ) && ! empty( $args['rgba_css'] ) && is_array( $args['rgba_css'] ) ) {

				$colors[ $name ] = $args['rgba_css'];

			}

		}

		return $colors;

	}
545336
public function getBuffer() : array
    {
        if($this->buffer !== null) {
            return $this->buffer;
        }

        $this->buffer = [];
        foreach ($this->reader->toArray() as $row => $children) {
            if(isset($this->buffer[$row]) == false) {
                $this->buffer[$row] = [];
            }

            foreach ($children as $col => $value) {
                $this->buffer[$row][$col] = [
                    'value' => $value,
                    'styles' => []
                ];
            }
        }

        return $this->buffer;
    }
211039
public function getCssClasses() {
		$the_array = $this->icons_array;

		if ( is_array( $the_array ) ) {
			$temp = array();

			foreach ( $the_array as $class => $unicode ) {
				$temp[ $class ] = $class;
			}

			$the_array = $temp;
		}

		return $the_array;
	}
409950
protected function getDefaultColors()
    {
        $colors = [
            [
                'name' => 'Pale pink',
                'color' => '#f78da7'
            ],
            [
                'name' => 'Vivid red',
                'color' => '#cf2e2e'
            ],
            [
                'name' => 'Luminous vivid orange',
                'color' => '#ff6900'
            ],
            [
                'name' => 'Luminous vivid amber',
                'color' => '#fcb900'
            ],
            [
                'name' => 'Light green cyan',
                'color' => '#7bdcb5'
            ],
            [
                'name' => 'Vivid green cyan',
                'color' => '#00d084'
            ],
            [
                'name' => 'Pale cyan blue',
                'color' => '#8ed1fc'
            ],
            [
                'name' => 'Vivid cyan blue',
                'color' => '#0693e3'
            ],
            [
                'name' => 'Very light gray',
                'color' => '#eeeeee'
            ],
            [
                'name' => 'Cyan bluish gray',
                'color' => '#abb8c3'
            ],
            [
                'name' => 'Very dark gray',
                'color' => '#313131'
            ]
        ];

        return array_map(function (array $color) {
            return [
                'name' => function_exists('__') ? __($color['name'], Application::TEXTDOMAIN) : $color['name'],
                'color' => $color['color']
            ];
        }, $colors);
    }