This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef __color_h__ | |
#define __color_h__ | |
/* | |
* I got some of the colour codes (as well as having the idea of putting them in a macro) from here: | |
* http://stackoverflow.com/questions/3506504/c-code-changes-terminal-text-color-how-to-restore-defaults-linux | |
*/ | |
#define RED "\e[31m" | |
#define GREEN "\e[32m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuration file for dircolors, a utility to help you set the | |
# LS_COLORS environment variable used by GNU ls with the --color option. | |
# Copyright (C) 1996, 1999-2010 Free Software Foundation, Inc. | |
# Copying and distribution of this file, with or without modification, | |
# are permitted provided the copyright notice and this notice are preserved. | |
# The keywords COLOR, OPTIONS, and EIGHTBIT (honored by the | |
# slackware version of dircolors) are recognized but ignored. | |
# Possibly useful emacs-lisp to show the colors: | |
# (font-lock-add-keywords nil '(("38;5;\\([1-9][0-9]+\\)" (1 `(face (:background ,((lambda (c) (let* ((x (- (string-to-int c) 16)) (arr '("00" "5f" "87" "af" "d7" "ff")) (blue (mod x 6)) (green (mod (/ x 6) 6)) (red (mod (/ x 36) 6))) (if (> x 215) (let* ((z (- x 216)) (s (nth z '("08" "12" "1c" "26" "30" "3a" "44" "4e" "58" "62" "6c" "76" "80" "8a" "94" "9e" "a8" "b2" "bc" "c6" "d0" "da" "e4" "ee" "ff")))) (concat "#" s s s)) (concat "#" (nth red arr) (nth green arr) (nth blue arr))))) (match-stri |