| 1 | # RGB terminal |
| 2 | |
| 3 | Have you had enough of the same 16 colors in your terminal? |
| 4 | |
| 5 | Welcome to a new world. A new world where colors are plentyful. |
| 6 | A world in 256 colors. |
| 7 | |
| 8 |  |
| 9 | |
| 10 | # Usage |
| 11 | |
| 12 | ```go |
| 13 | // pick a color |
| 14 | var r, g, b uint8 |
| 15 | r, g, b = 252, 255, 43 |
| 16 | // choose a word |
| 17 | word := "=)" |
| 18 | // colorize it! |
| 19 | coloredWord := rgbterm.FgString(word, r, g, b) |
| 20 | // print it! |
| 21 | fmt.Println("Oh!", coloredWord, "hello!") |
| 22 | ``` |
| 23 | |
| 24 | >  |
| 25 | |
| 26 | Also, to be correct: there are 216 colors and 16 grey scales. For more details, [Xterm][xterm-wiki]. |
| 27 | |
| 28 | [xterm-wiki]: https://en.wikipedia.org/wiki/Xterm |