README.md in tty-screen-0.3.0 vs README.md in tty-screen-0.4.0
- old
+ new
@@ -9,13 +9,13 @@
[travis]: http://travis-ci.org/peter-murach/tty-screen
[codeclimate]: https://codeclimate.com/github/peter-murach/tty-screen
[coverage]: https://coveralls.io/r/peter-murach/tty-screen
[inchpages]: http://inch-ci.org/github/peter-murach/tty-screen
-> Terminal screen size detection which works both on Linux, OS X and Windows/Cygwin platforms and supports MRI, JRuby and Rubinius interpreters.
+> Terminal screen size and color detection which works both on Linux, OS X and Windows/Cygwin platforms and supports MRI, JRuby and Rubinius interpreters.
-**TTY::Screen** provides independent screen size detection component for [TTY](https://github.com/peter-murach/tty) toolkit.
+**TTY::Screen** provides independent screen size and color detection component for [TTY](https://github.com/peter-murach/tty) toolkit.
## Installation
Add this line to your application's Gemfile:
@@ -41,15 +41,24 @@
screen.size # => [51, 280]
screen.width # => 280
screen.height # => 51
```
+Using the `color?` method, you can check whether terminal has color capabilities like so
+
+```ruby
+screen = TTY::Screen.new
+screen.color? # => true
+```
+
You can also use above methods as class instance methods:
```ruby
TTY::Screen.size # => [51, 280]
TTY::Screen.width # => 280
TTY::Screen.height # => 51
+
+TTY::Screen.color? # => true
```
## Contributing
1. Fork it ( https://github.com/[my-github-username]/tty-screen/fork )