Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

QColor QColor::darker ( int  factor = 200  )  const [inline]

Returns a darker (or lighter) color, but does not change this object.

If the factor is greater than 100, this functions returns a darker color. Setting factor to 300 returns a color that has one-third the brightness. If the factor is less than 100, the return color is lighter, but we recommend using the lighter() function for this purpose. If the factor is 0 or negative, the return value is unspecified.

The function converts the current RGB color to HSV, divides the value (V) component by factor and converts the color back to RGB.

See also:
lighter(), isValid()

Definition at line 268 of file qcolor.h.

References dark().

Referenced by QCleanlooksStyle::drawComplexControl(), QPlastiqueStyle::drawComplexControl(), QPlastiqueStyle::drawControl(), QWindowsVistaStyle::drawControl(), QCleanlooksStyle::drawControl(), QWindowsXPStyle::drawControl(), QWindowsVistaStyle::drawPrimitive(), QCleanlooksStyle::drawPrimitive(), QPlastiqueStyle::drawPrimitive(), light(), QMotifStyle::polish(), QPlastiqueStyle::polish(), QWindowsXPStyle::polish(), QCDEStyle::standardPalette(), QStyle::standardPalette(), QCleanlooksStyle::standardPalette(), QPlastiqueStyle::standardPalette(), and QCleanlooksStyle::styleHint().

{ return dark(f); }

Generated by  Doxygen 1.6.0   Back to index