- Updated top-level docs to include a note about
ColoredString
's role in theColorize
pipeline as well as link to it to suggest learning more about how to manipulate existingColoredString
's. - Changes to
ColoredString
:- Expose fields.
- [DEPRECATION]: Deprecated methods
fgcolor
,bgcolor
, andstyle
due to their obsolescence in the face of the exposing of their represented fields. - Add methods for clearing specific elements of
fgcolor
,bgcolor
, andstyle
. - Change Default implementation to be via derive as Style now implements Default (see changes to Style below).
- Add implementation of
DerefMut
. - Updated docs to reflect the above changes as well as generally greatly expand them.
- Changes to
Style
:- Implemented
Default
forStyle
(returnsCLEAR
). This exposes a method by which users can create plainStyle
's from scratch. - Implemented
From<Styles>
forStyle
. This lets users easily createStyle
's from specific styles. - Exposed previously private method
add
. - Created method
remove
which essentially does the opposite. - Added builder-style methods in the vein of
Colorize
to add stylings (e.g.bold
,underline
,italic
,strikethrough
). - Implemented bitwise operators
BitAnd
,BitOr
,BitXor
, andNot
as well as their representative assignment operators. You can also use aStyles
as an operand for these. - Implemented
FromIterator<Styles>
for Style.
- Implemented
- Changes to
Styles
:- Implemented bitwise operators
BitAnd
,BitOr
,BitXor
, andNot
which all combineStyles
's and outputStyle
's. These can also take aStyle
as an operand.
- Implemented bitwise operators
- Added additional testing for all of the above changes.
- Added methods
with_style
andwith_color_and_style
toColorize
.
- Impl From for ColoredString by @mahor1221 in colored-rs#126
- Allow conversion from ColoredString to Error by @spenserblack in colored-rs#86
- Suggestion for minor documentation clarification by @jonasbn in colored-rs#98
- Remove unnecessary is_terminal dependency by @Oakchris1955 in colored-rs#149
- Document crate MSRV of
1.70
.
- Document crate MSRV of
- Switch from
winapi
towindows-sys
.
- Document crate MSRV of
1.63
.
- Fix typo in
src/control.rs
. - Replace
atty
dependency withis-terminal
.
- Add edition for future compatibility.
- Implement custom colors that can be stored in a variable.
- Add support for true colours.
- Alter
Color
interface to returnCow<'static, str>
- Fix compilation regression for 1.34.0. Thanks @jlevon for reporting.
- Exposed
ColoredString
data through methods for purposes of interrogating the applied colours. - Increased documentation.
- Remove deprecated
try!
macro in codebase - Reduce allocations in
ColoredString
impl (PR#65) - Added
"purple"
as match inimpl FromStr for Color
(PR#71)
- [POSSIBLE_BREAKING CHANGE]: Replace
winconsole
withwinapi
:- Changes
set_virtual_terminal
function signature.
- Changes
- Update dependencies
- Add Dockerfile
- Respect tty discovery for CLICOLOR
- FEAT: support Windows 10 colors
- TECH: update lazy_static
- FEAT: introduce respect for the
NO_COLOR
environment variable
- TECH: update lazy_static
- CHORE: fix typos in README and documentation
- FEAT: introduced bright colors.
"hello".bright_blue().on_bright_red();
- FEAT: introduced strikethrough styling.
"hello".strikethrough();
- FEAT: derive Copy and Clone for
Color
- FEAT: derive Clone for
ColoredString
- FIX: method
Colorize::reversed
has been added.Colorize::reverse
was a typo, that we will keep for compatibility
- Update lazy_static to 0.2.
- FEAT: support for
"hello".color("blue")
(dynamic colors)
- FIX: usage of nested ColoredString again, no more style broken mid-line
- FIX: usage of ColoredString in a nested way broke the styling mid-line
- Provide various options for disabling the coloring in an API-compatible way
- Support the different formatting options, like padding and alignment
- Respect the CLICOLOR/CLICOLOR_FORCE behavior. See this specs
- Add a CHANGLOG
- Fix crate dependencies: move
ansi_term
in dev_dependencies
- Initial release