You can not color plain text in a GitHub README.md file. You can however add color to code samples in your GitHub README.md file with the tags below.
To do this, just add tags, such as these samples, to your README.md file:
```json // Code for coloring ``` ```html // Code for coloring ``` ```js // Code for coloring ``` ```css // Code for coloring ``` // etc.
import { Component } from '@angular/core'; import { MovieService } from './services/movie.service'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleUrls: ['./app.component.css'], providers: [ MovieService ] }) export class AppComponent { title = 'app works!'; }
No "pre" or "code" tags are needed.
This is now covered in the GitHub Markdown documentation (about half way down the page, there's an example using Ruby). GitHub uses Linguist to identify and highlight syntax - you can find a full list of supported languages (as well as their markdown keywords) over in the Linguist's YAML file.