Version: (using KDE Devel) Installed from: Compiled sources In the default generated page, the background color is black, and the link color of the word "kimdaba" in the text "Image gallery created with kimdaba on Sunday 05 September 2004" is also black.
Created attachment 7411 [details] Image showing the problem
CVS commit by pahlibar: use a simple hsv cycle algo to try and get contrasting colors for links. not perfect, but will do BUG: 88870 M +19 -0 imagesgallery.cpp 1.42 --- kdeextragear-libs-1/kipi-plugins/imagesgallery/imagesgallery.cpp #1.41:1.42 @@ -628,4 +628,21 @@ void ImagesGallery::createCSSSection(QTe QString bordersImagesColor = m_bordersImagesColor.name(); + // Since the link colors are not set by the config, they can become invisible + // because of the choice of the background color set by user. Find + // contrasting color so that it becomes distinguishable + + int h,s,v; + m_backgroundColor.getHsv(&h, &s, &v); + + h = (h+180) % 360; + v = (v+128) % 256; + QColor linkRegColor; + linkRegColor.setHsv(h, s, v); + + h = (h+60) % 360; + s = QMAX(s-60, 0); + QColor linkVisColor; + linkVisColor.setHsv(h, s, v); + // Adding a touch of style @@ -639,4 +656,6 @@ void ImagesGallery::createCSSSection(QTe stream << "IMG.photo { border: " << m_bordersImagesSize << "px solid " << bordersImagesColor << "; }" << endl; + stream << "a:link { color: " << linkRegColor.name() << "; }" << endl; + stream << "a:visited { color: " << linkVisColor.name() << "; }" << endl; stream << "</style>" << endl; }