navbar color in Twitter Bootstrap

You can overwrite the bootstrap colors, including the .navbar-inner class, by targetting it in your own stylesheet as opposed to modifying the bootstrap.css stylesheet, like so: .navbar-inner { background-color: #2c2c2c; /* fallback color, place your own */ /* Gradients for modern browsers, replace as you see fit */ background-image: -moz-linear-gradient(top, #333333, #222222); background-image: -ms-linear-gradient(top, #333333, … Read more

gnuplot: apply colornames from datafile

In case somebody wants to use a lookup table as @Ethan suggested, here are the 111 predefined gnuplot colors in arrays (taken from the gnuplot manual). array ColorNames[111] = \ [‘white’, ‘black’, ‘dark-grey’, ‘red’, ‘web-green’, ‘web-blue’, ‘dark-magenta’, ‘dark-cyan’, ‘dark-orange’, ‘dark-yellow’, \ ‘royalblue’, ‘goldenrod’, ‘dark-spring-green’, ‘purple’, ‘steelblue’, ‘dark-red’, ‘dark-chartreuse’, ‘orchid’, ‘aquamarine’, ‘brown’, \ ‘yellow’, ‘turquoise’, ‘grey0’, … Read more

Converting hex color to RGB and vice-versa

In python: def hex_to_rgb(value): “””Return (red, green, blue) for the color given as #rrggbb.””” value = value.lstrip(‘#’) lv = len(value) return tuple(int(value[i:i + lv // 3], 16) for i in range(0, lv, lv // 3)) def rgb_to_hex(red, green, blue): “””Return color as #rrggbb for the given color values.””” return ‘#%02x%02x%02x’ % (red, green, blue) hex_to_rgb(“#ffffff”) … Read more

List of ANSI color escape sequences

The ANSI escape sequences you’re looking for are the Select Graphic Rendition subset. All of these have the form \033[XXXm where XXX is a series of semicolon-separated parameters. To say, make text red, bold, and underlined (we’ll discuss many other options below) in C you might write: printf(“\033[31;1;4mHello\033[0m”); In C++ you’d use std::cout<<“\033[31;1;4mHello\033[0m”; In Python3 … Read more