Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #4 from jnovack/fix-dark

BUG: Changing from Light color to Dark (same)color does not work.
  • Loading branch information...
commit 771a5a4acc850ad874527798f60e030b8aa47dec 2 parents ae151f6 + daa45ec
Daniel O'Connor CloCkWeRX authored

Showing 1 changed file with 13 additions and 13 deletions. Show diff stats Hide diff stats

  1. +13 13 Console/Color2.php
26 Console/Color2.php
@@ -131,14 +131,14 @@ public function color($color = null, $style = null, $background = null) // {{{
131 131 }
132 132
133 133 $code = array();
134   - if (isset($color)) {
135   - $code[] = $colors['color'][$color];
136   - }
137   -
138 134 if (isset($style)) {
139 135 $code[] = $colors['style'][$style];
140 136 }
141 137
  138 + if (isset($color)) {
  139 + $code[] = $colors['color'][$color];
  140 + }
  141 +
142 142 if (isset($background)) {
143 143 $code[] = $colors['background'][$background];
144 144 }
@@ -217,15 +217,15 @@ public function convert($string, $colored = true)
217 217 static $conversions = array ( // static so the array doesn't get built
218 218 // everytime
219 219 // %y - yellow, and so on... {{{
220   - '%y' => array('color' => 'yellow'),
221   - '%g' => array('color' => 'green' ),
222   - '%b' => array('color' => 'blue' ),
223   - '%r' => array('color' => 'red' ),
224   - '%p' => array('color' => 'purple'),
225   - '%m' => array('color' => 'purple'),
226   - '%c' => array('color' => 'cyan' ),
227   - '%w' => array('color' => 'grey' ),
228   - '%k' => array('color' => 'black' ),
  220 + '%y' => array('color' => 'yellow', 'style' => 'normal'),
  221 + '%g' => array('color' => 'green', 'style' => 'normal'),
  222 + '%b' => array('color' => 'blue', 'style' => 'normal'),
  223 + '%r' => array('color' => 'red', 'style' => 'normal'),
  224 + '%p' => array('color' => 'purple', 'style' => 'normal'),
  225 + '%m' => array('color' => 'purple', 'style' => 'normal'),
  226 + '%c' => array('color' => 'cyan', 'style' => 'normal'),
  227 + '%w' => array('color' => 'grey', 'style' => 'normal'),
  228 + '%k' => array('color' => 'black', 'style' => 'normal'),
229 229 '%n' => array('color' => 'reset' ),
230 230 '%Y' => array('color' => 'yellow', 'style' => 'light'),
231 231 '%G' => array('color' => 'green', 'style' => 'light'),

0 comments on commit 771a5a4

Please sign in to comment.
Something went wrong with that request. Please try again.