|
|
Author: matt
Date: 2007-03-20 04:52:51 -0500 (Tue, 20 Mar 2007)
New Revision: 5748
Log:
Better contrast (#1625)
Modified:
branches/branch-1.1/CHANGES
branches/branch-1.1/src/fl_color.cxx
Modified: branches/branch-1.1/CHANGES
===================================================================
--- branches/branch-1.1/CHANGES 2007-03-20 09:42:36 UTC (rev 5747)
+++ branches/branch-1.1/CHANGES 2007-03-20 09:52:51 UTC (rev 5748)
@@ -4,6 +4,9 @@
STR #1457, STR #1458, STR #1460, STR #1481, STR #1578)
- The sample RPM spec file now enables large file support
and threading support (STR #1603)
+ - Changed minumu contrast between background and text to
+ 96 and added more weight to the blue component to improve
+ readability (STR #1625)
- Fixed VCNet OpenGL project file (STR #1617)
- Fixed scrolling of clipped areas in MSWindows (STR
#1601)
Modified: branches/branch-1.1/src/fl_color.cxx
===================================================================
--- branches/branch-1.1/src/fl_color.cxx 2007-03-20 09:42:36 UTC (rev 5747)
+++ branches/branch-1.1/src/fl_color.cxx 2007-03-20 09:52:51 UTC (rev 5748)
@@ -374,12 +374,12 @@
else c2 = fl_cmap[bg];
// Compute the luminosity...
- l1 = ((c1 >> 24) * 31 + ((c1 >> 16) & 255) * 61 + ((c1 >> 8) & 255) * 8) / 100;
- l2 = ((c2 >> 24) * 31 + ((c2 >> 16) & 255) * 61 + ((c2 >> 8) & 255) * 8) / 100;
+ l1 = ((c1 >> 24) * 30 + ((c1 >> 16) & 255) * 59 + ((c1 >> 8) & 255) * 11) / 100;
+ l2 = ((c2 >> 24) * 30 + ((c2 >> 16) & 255) * 59 + ((c2 >> 8) & 255) * 11) / 100;
// Compare and return the contrasting color...
- if ((l1 - l2) > 90) return fg;
- else if ((l2 - l1) > 90) return fg;
+ if ((l1 - l2) > 96) return fg;
+ else if ((l2 - l1) > 96) return fg;
else if (l2 > 127) return FL_BLACK;
else return FL_WHITE;
}
[ Direct Link to Message ] | |
|
| |