Lines Matching refs:color
20 throw new ValidationException('bad color specification');
37 $R->doc .= '<div title="' . hsc($value) . '" style="background-color:' . hsc($value) . ';"
67 // any non-color (eg. from a previous type) should default to the default
75 'type' => 'color',
87 $color = $this->displayValue($value);
90 $style = "background-color:$color;";
92 <span class='a11y'>$color</span>
96 $R->internallink("$page?$filter", $color);
101 * Sort by the hue of a color, not by its hex-representation
110 * Calculate the hue of a color to use it for sorting so we can sort similar colors together.
112 * @param string $color the color as #RRGGBB
115 protected function getHue($color)
117 if (!preg_match('/^#[0-9A-F]{6}$/i', $color)) {
121 $red = hexdec(substr($color, 1, 2));
122 $green = hexdec(substr($color, 3, 2));
123 $blue = hexdec(substr($color, 5, 2));