summaryrefslogtreecommitdiff
path: root/src/fl_color.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2007-05-16 11:46:07 +0000
committerMatthias Melcher <fltk@matthiasm.com>2007-05-16 11:46:07 +0000
commit849efb47ae1ba1d3169044a6a949b4c73b770f55 (patch)
tree8600892d6bbf687405935efe78b0a2d6ab8396ff /src/fl_color.cxx
parent2c7bea98fe956a88fbe34d14d4f289d3fc866c26 (diff)
STR #1625: yet another slight change in the "fl_contrast" cut-off value that hopefully now delivers best results for all color schemes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5835 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_color.cxx')
-rw-r--r--src/fl_color.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/fl_color.cxx b/src/fl_color.cxx
index d39b0d895..cad299f4d 100644
--- a/src/fl_color.cxx
+++ b/src/fl_color.cxx
@@ -378,8 +378,8 @@ Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg) {
l2 = ((c2 >> 24) * 30 + ((c2 >> 16) & 255) * 59 + ((c2 >> 8) & 255) * 11) / 100;
// Compare and return the contrasting color...
- if ((l1 - l2) > 96) return fg;
- else if ((l2 - l1) > 96) return fg;
+ if ((l1 - l2) > 99) return fg;
+ else if ((l2 - l1) > 99) return fg;
else if (l2 > 127) return FL_BLACK;
else return FL_WHITE;
}