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