You can acheive what you want by drawing the text with an outline in one color, and then drawing it without outline on top of that, in another color.
Here's an example of white text with a black outline from the libsdl forum:
#define OUTLINE_SIZE 2
/* load font and its outline */
font = TTF_OpenFont(font_path, font_size);
font_outline = TTF_OpenFont(font_path, font_size);
TTF_SetFontOutline(font_outline, OUTLINE_SIZE);
/* render text and text outline */
SDL_Color white = {0xFF, 0xFF, 0xFF};
SDL_Color black = {0x00, 0x00, 0x00};
SDL_Surface *bg_surface = TTF_RenderText_Blended(font_outline, text, black);
SDL_Surface *fg_surface = TTF_RenderText_Blended(font, text, white);
SDL_Rect rect = {OUTLINE_SIZE, OUTLINE_SIZE, fg_surface->w, fg_surface->h};
/* blit text onto its outline */
SDL_SetSurfaceBlendMode(fg_surface, SDL_BLENDMODE_BLEND);
SDL_BlitSurface(fg_surface, NULL, bg_surface, &rect);
SDL_FreeSurface(fg_surface);
/* we now have RGBA white text with black outline in bg_surface */