Feature - 256-color support

- Added precautionary bit reset for bold and bright in 256-color mode.
  Not sure if it is important, but it's cleaner.
This commit is contained in:
Paul Beckingham 2009-09-23 23:26:39 -04:00
parent 675df6487a
commit bb2eb5f266

View file

@ -166,6 +166,8 @@ Color::Color (const std::string& spec)
}
value |= _COLOR_256;
value &= ~_COLOR_BOLD;
value &= ~_COLOR_BRIGHT;
}
// rgbRGB, where 0 <= R,G,B <= 5.
@ -197,6 +199,8 @@ Color::Color (const std::string& spec)
}
value |= _COLOR_256;
value &= ~_COLOR_BOLD;
value &= ~_COLOR_BRIGHT;
}
// colorN, where 0 <= N <= 255.
@ -218,6 +222,8 @@ Color::Color (const std::string& spec)
}
value |= _COLOR_256;
value &= ~_COLOR_BOLD;
value &= ~_COLOR_BRIGHT;
}
else
throw std::string ("The color '") + *it + "' is not recognized.";