diff --git a/src/apps/webpositive/URLInputGroup.cpp b/src/apps/webpositive/URLInputGroup.cpp index 9a0437e9ae..d4fff1af8b 100644 --- a/src/apps/webpositive/URLInputGroup.cpp +++ b/src/apps/webpositive/URLInputGroup.cpp @@ -382,17 +382,20 @@ URLInputGroup::URLTextView::InsertText(const char* inText, int32 inLength, BFont font; GetFont(&font); - const rgb_color black = (rgb_color) { 0, 0, 0, 255 }; - const rgb_color gray = (rgb_color) { 60, 60, 60, 255 }; + const rgb_color hostColor = ui_color(B_DOCUMENT_TEXT_COLOR); + const rgb_color urlColor = tint_color(hostColor, + (hostColor.Brightness() < 128 ? B_LIGHTEN_1_TINT : B_DARKEN_1_TINT)); if (baseUrlStart > 0) - SetFontAndColor(0, baseUrlStart, &font, B_FONT_ALL, &gray); + SetFontAndColor(0, baseUrlStart, &font, B_FONT_ALL, &urlColor); if (baseUrlEnd > baseUrlStart) { font.SetFace(B_BOLD_FACE); - SetFontAndColor(baseUrlStart, baseUrlEnd, &font, B_FONT_ALL, &black); + SetFontAndColor(baseUrlStart, baseUrlEnd, &font, B_FONT_ALL, + &hostColor); } if (baseUrlEnd < TextLength()) { font.SetFace(B_REGULAR_FACE); - SetFontAndColor(baseUrlEnd, TextLength(), &font, B_FONT_ALL, &gray); + SetFontAndColor(baseUrlEnd, TextLength(), &font, B_FONT_ALL, + &urlColor); } fURLAutoCompleter->TextModified(fUpdateAutoCompleterChoices);