Display part of fortune in different color

Source: coloring command output

The code:

#!/bin/bash
OIFS=$IFS #save old IFS

frtn=$(fortune tweets) #load up a fortune
IFS='@' #new IFS
arr=($frtn) #split fortune into array along IFS

tweet=$(tput setaf 3)"${arr[0]}"$(tput setaf default) #tweet - dark yellow color
uname=$(tput setaf 7)"@${arr[1]}\n"$(tput setaf default) #create @username - white
echo -e "$tweet$uname"; #to retain newlines in original fortune, echo between quotes

IFS=$OIFS #restore old IFS

Just copy paste that into your .bashrc file.

EDIT

The result: enter image description here