<commit_before>= colors

Ever wondered how to get colors on your terminal? Now you can and ever so easily. 

First, gotta thank the Passenger folks for the initial implementation of the brilliant idea.

h3. Usage
  require "colors"
  
  Colors.process("<red>Text</red>")
  
Any of these colors red, green, yellow, blue, purple, sea, white are available.

You can add backgrounds to your color by passing bg= in a tag, for instance:
  
  Colors.process("<blue bg=yellow>Blue text on yellow bg</blue>")
  
Finally, you can bold your text with <b>, for instance:
  
  Colors.process("<b>BOLD</b>")

h3. Terminal color explanation

Non-printing escape sequences have to be enclosed in \[\033[ and \]. For colour escape sequences, they should also be followed by a lowercase m.

So for instance, if you wanted red text, for example, you would surround your text with:

  \e[1m\e[31mRed text\e[0m\e[37m\e[40m

To see all the colors available on your terminal and as a quick and easy guide, run this in your shell:
  #!/bin/bash

  T='text'   # The test text

  echo -e "\n                 40m     41m     42m     43m\
       44m     45m     46m     47m";

  for FGs in '    m' '   1m' '  30m' '1;30m' '  31m' '1;31m' '  32m' \
             '1;32m' '  33m' '1;33m' '  34m' '1;34m' '  35m' '1;35m' \
             '  36m' '1;36m' '  37m' '1;37m';
    do FG=${FGs// /}
    echo -en " $FGs \033[$FG  $T  "
    for BG in 40m 41m 42m 43m 44m 45m 46m 47m;
      do echo -en "$EINS \033[$FG\033[$BG  $T  \033[0m";
    done
    echo;
  done
  echo

== Copyright

Copyright (c) 2009 <NAME>. See LICENSE for details.<commit_msg>Updated readme formatting<commit_after>= colors

Ever wondered how to get colors on your terminal? Now you can and ever so easily. 

First, gotta thank the Passenger folks for the initial implementation of the brilliant idea.

== Usage
  require "colors"
  
  Colors.process("<red>Text</red>")
  
Any of these colors red, green, yellow, blue, purple, sea, white are available.

You can add backgrounds to your color by passing bg= in a tag, for instance:
  
  Colors.process("<blue bg=yellow>Blue text on yellow bg</blue>")
  
Finally, you can bold your text with <b>, for instance:
  
  Colors.process("<b>BOLD</b>")

== Terminal color explanation

Non-printing escape sequences have to be enclosed in \[\033[ and \]. For colour escape sequences, they should also be followed by a lowercase m.

So for instance, if you wanted red text, for example, you would surround your text with:

  \e[1m\e[31mRed text\e[0m\e[37m\e[40m

To see all the colors available on your terminal and as a quick and easy guide, run this in your shell:
  #!/bin/bash

  T='text'   # The test text

  echo -e "\n                 40m     41m     42m     43m\
       44m     45m     46m     47m";

  for FGs in '    m' '   1m' '  30m' '1;30m' '  31m' '1;31m' '  32m' \
             '1;32m' '  33m' '1;33m' '  34m' '1;34m' '  35m' '1;35m' \
             '  36m' '1;36m' '  37m' '1;37m';
    do FG=${FGs// /}
    echo -en " $FGs \033[$FG  $T  "
    for BG in 40m 41m 42m 43m 44m 45m 46m 47m;
      do echo -en "$EINS \033[$FG\033[$BG  $T  \033[0m";
    done
    echo;
  done
  echo

== Copyright

Copyright (c) 2009 <NAME>. See LICENSE for details.
{'fraction_non_alphanumeric': 0.11455108359133127, 'fraction_numerical': 0.06315789473684211, 'mean_word_length': 2.586015538290788, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6556072', 'n_tokens_mistral': 1280, 'n_tokens_neox': 1132, 'n_words': 447}