Since there seem to be repeated questions (including the one that brought me here) about colours in apt and not much documentation on it, I thought it might be helpful to dig into this a bit more. The following expands on Faheem Mitha's answer.
The apt source code contains colour definitions for highlight and neutral and several colours (red, green, etc) in apt-private/private-output.cc. The definitions look like this:
The code inside the quotation marks is an ANSI escape sequence, a combination of hexadecimal digits interpreted by many terminal shells, in this case for the foreground colour yellow. The first character in the colour codes is hexadecimal 1B. There is no printed equivalent. If you view the code, the hex digit may show up as a caret (^) or a fuzzy little box or as ESC or not at all (as here), depending on what's sending the output and to where.
Despite defining several colours, apt currently (1.8.2) doesn't use most of them. Highlight and Neutral are used in a few places, but none of the colours are except Yellow. It appears in one line in acqprogress.cc as the output colour for status.
Hence, "Yellow" can be thought of as a placeholder for the status line colour. If the colour is inappropriate (yellow on white for example), changing the code for "Yellow" - to blue say:
and then appending it to the end of /etc/apt/apt.conf using the printf approach in Faheem Mitha's answer fixes it:
printf "APT::Color::Yellow \"\e[34m\";\n" >> /etc/apt/apt.conf
Alternatively, you could use a hex editor (Oktata in my case) to change /etc/apt/apt.conf directly. Note that apt.conf may not exist; apt works fine without it, but will read it if it's there.
That's why changing the colours in the shell before running apt has no impact. Apt is hard coded to use its definition of "Yellow".
in a terminal will output any colour codes in apt.conf (among other things). Each code will, in turn, change the terminal's colours. If the last or only line in apt.conf is "Yellow", the terminal will be set to whatever is assigned to "Yellow". That can be avoided by putting the reset code (which apt calls neutral)
after the new definition of "Yellow" at the end of the file. Using the printf approach, that's:
printf "APT::Color::Neutral \"\e[0m\";\n" >> /etc/apt/apt.conf