Mercurial > projects > dwt-addons
diff dwtx/jface/internal/text/revisions/Colors.d @ 162:1a5b8f8129df
...
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Mon, 08 Sep 2008 00:51:37 +0200 |
parents | 25f1f92fa3df |
children |
line wrap: on
line diff
--- a/dwtx/jface/internal/text/revisions/Colors.d Wed Aug 27 14:49:30 2008 +0200 +++ b/dwtx/jface/internal/text/revisions/Colors.d Mon Sep 08 00:51:37 2008 +0200 @@ -62,9 +62,9 @@ * @return a normalized version of <code>color</code> * @see #brightness(RGB) */ - public static RGB adjustBrightness(RGB color, float brightness) { + public static RGB adjustBrightness(RGB color, float brightness_) { float[] hsi= toHSI(color); - float psychoFactor= brightness - brightness(color); + float psychoFactor= brightness_ - brightness(color); float weight= 0.5f; // found by trial and error hsi[2]= Math.max(0, Math.min(1.0f, hsi[2] + psychoFactor * weight)); color= fromHSI(hsi);