ktoso / scala-rainbow   0.2

GitHub

Super simple terminal output colorizing for Scala

Scala versions: 2.11 2.10

scala-rainbow

Super simple terminal output colorizing for Scala. Using it you can colorize any string for terminal output and was tested on Linux and OSX, not on windows and there it probably sux ;-)

Example

Scala Rainbow Demo

Download

It's published to sonatype and synced with Maven Central, so all you need to do is:

for sbt:

val scalaRainbow = "pl.project13.scala" %% "rainbow" % "0.2"

libraryDependencies += scalaRainbow

for maven:

<dependency>
  <groupId>pl.project13.scala</groupId>
  <artifactId>rainbow_2.10.4</artifactId> <!-- your scala version here -->
  <version>0.2</version>
</dependency>

The library is published for Scala: 2.9.1, 2.9.2 (0.1) and 2.10.4, 2.11.x (0.2).

Usage

Using rainbow is as simple as it gets:

import Rainbow._

println { "Warning, critical error!".red }

You can us it as a mixin with Rainbow or import Rainbow._ or import the package object import pl.project13.scala.rainbow._. For a list of available colors take a look at Rainbow.scala.

Yay, feedback!

btw I really like your lib!
It reminds me of "node-colors" for node.js

License

Public Domain - Just use it however you see fit.