summaryrefslogtreecommitdiff
path: root/tools/source
diff options
context:
space:
mode:
authorLuke Deller <luke@deller.id.au>2013-03-09 01:26:56 +1100
committerFridrich Strba <fridrich@documentfoundation.org>2013-03-11 14:54:57 +0000
commit77e21bb36a2cdaaa0f4049dee0d45c5b2325c6e9 (patch)
tree9ae1c4c5f567622d4311b09a7555555e124579e1 /tools/source
parentb0dec5f73dbfe2ca1db2fec6d3e84472f2b62a3f (diff)
Change definition of "dark" colour for fdo#61993
- Increase the threshold for "dark" colours from Luminosity<=38 to Luminosity<=60. This makes LibreOffice align more closely with MS Word when considering whether "automatic" font colour should be black or white, a decision that is based on whether the background colour is "dark". Beware that this also affects other areas. - Fix the coefficients for GetLuminosity which appeared to be off by one according to the "Rec 601" coefficients for Luma quoted at http://en.wikipedia.org/wiki/Luma_%28video%29 Change-Id: I0af1f77909713e3db5ea8ee98456146569679594 Reviewed-on: https://gerrit.libreoffice.org/2601 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'tools/source')
-rw-r--r--tools/source/generic/color.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx
index 33e6aff5b8cc..a6a8084147c5 100644
--- a/tools/source/generic/color.cxx
+++ b/tools/source/generic/color.cxx
@@ -102,7 +102,7 @@ void Color::Invert()
sal_Bool Color::IsDark() const
{
- return GetLuminance() <= 38;
+ return GetLuminance() <= 60;
}
sal_Bool Color::IsBright() const