@@ -24,12 +24,12 @@ discard block |
||
24 | 24 | public function getTests() |
25 | 25 | { |
26 | 26 | return [ |
27 | - new TwigTest('color_valid', [$this, 'isValid']), |
|
28 | - new TwigTest('color_readable', [$this, 'isReadable']), |
|
29 | - new TwigTest('color_low_contrast', [$this, 'isLowContrast']), |
|
30 | - new TwigTest('color_dark', [$this, 'isDark']), |
|
31 | - new TwigTest('color_light', [$this, 'isLight']), |
|
32 | - new TwigTest('color_has_name', [$this, 'hasColorName']), |
|
27 | + new TwigTest('color_valid', [ $this, 'isValid' ]), |
|
28 | + new TwigTest('color_readable', [ $this, 'isReadable' ]), |
|
29 | + new TwigTest('color_low_contrast', [ $this, 'isLowContrast' ]), |
|
30 | + new TwigTest('color_dark', [ $this, 'isDark' ]), |
|
31 | + new TwigTest('color_light', [ $this, 'isLight' ]), |
|
32 | + new TwigTest('color_has_name', [ $this, 'hasColorName' ]), |
|
33 | 33 | ]; |
34 | 34 | } |
35 | 35 | |
@@ -39,17 +39,17 @@ discard block |
||
39 | 39 | public function getFilters() |
40 | 40 | { |
41 | 41 | return [ |
42 | - new TwigFilter('color_darken', [$this, 'darken']), |
|
43 | - new TwigFilter('color_lighten', [$this, 'lighten']), |
|
44 | - new TwigFilter('color_adjust_hue', [$this, 'adjustHue']), |
|
45 | - new TwigFilter('color_text_color', [$this, 'getMatchingTextColor']), |
|
46 | - new TwigFilter('color_complementary', [$this, 'getComplementary']), |
|
47 | - new TwigFilter('color_css_rgb', [$this, 'getCssRgb']), |
|
48 | - new TwigFilter('color_css_rgba', [$this, 'getCssRgba']), |
|
49 | - new TwigFilter('color_css_hsl', [$this, 'getCssHsl']), |
|
50 | - new TwigFilter('color_css_hsla', [$this, 'getCssHsla']), |
|
51 | - new TwigFilter('color_css_hex', [$this, 'getCssHex']), |
|
52 | - new TwigFilter('color_css_name', [$this, 'getCssColorName']), |
|
42 | + new TwigFilter('color_darken', [ $this, 'darken' ]), |
|
43 | + new TwigFilter('color_lighten', [ $this, 'lighten' ]), |
|
44 | + new TwigFilter('color_adjust_hue', [ $this, 'adjustHue' ]), |
|
45 | + new TwigFilter('color_text_color', [ $this, 'getMatchingTextColor' ]), |
|
46 | + new TwigFilter('color_complementary', [ $this, 'getComplementary' ]), |
|
47 | + new TwigFilter('color_css_rgb', [ $this, 'getCssRgb' ]), |
|
48 | + new TwigFilter('color_css_rgba', [ $this, 'getCssRgba' ]), |
|
49 | + new TwigFilter('color_css_hsl', [ $this, 'getCssHsl' ]), |
|
50 | + new TwigFilter('color_css_hsla', [ $this, 'getCssHsla' ]), |
|
51 | + new TwigFilter('color_css_hex', [ $this, 'getCssHex' ]), |
|
52 | + new TwigFilter('color_css_name', [ $this, 'getCssColorName' ]), |
|
53 | 53 | ]; |
54 | 54 | } |
55 | 55 | |
@@ -219,7 +219,7 @@ discard block |
||
219 | 219 | $generator = new PaletteGenerator($this->parseColor($color)); |
220 | 220 | $palette = $generator->triad($distance); |
221 | 221 | |
222 | - return $palette[1]->getHex(); |
|
222 | + return $palette[ 1 ]->getHex(); |
|
223 | 223 | } |
224 | 224 | |
225 | 225 | /** |