Bug 125288 - wrong Bar color name in the Data bar dialog (#0000FF instead of Blue)
Summary: wrong Bar color name in the Data bar dialog (#0000FF instead of Blue)
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
Hardware: All All
: medium normal
Assignee: László Kovács
Whiteboard: target:6.4.0
Keywords: difficultyBeginner, easyHack, skillDesign, topicDesign
Depends on:
Blocks: Conditional-Formatting-Editing
  Show dependency treegraph
Reported: 2019-05-14 20:02 UTC by Roman Kuznetsov
Modified: 2019-08-08 08:24 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Roman Kuznetsov 2019-05-14 20:02:26 UTC
wrong color name in Data bar dialog (#0000FF instead Blue)

Steps to Reproduce:
1. Open Calc
2. Select Conditional icon on toolbar
3. Select Data bar in drop-down list of conditions
4. In dialog Conditional formatting press More options button
5. Look at Positive color name -> #0000FF instead Blue

Actual Results:
#0000FF instead Blue

Expected Results:

Reproducible: Always

User Profile Reset: No

Additional Info:
Version: (x64)
Build ID: ccf3a0600ee902390ad6112ecf28223078bdd2db
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-05-13_03:08:59
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded
Comment 1 MM 2019-05-14 21:14:42 UTC
Confirmed on windows 7 x64 with Version: (x64)
Build ID: aecc05fe267cc68dde00352a451aa867b3b546ac
CPU threads: 3; OS: Windows 6.1; UI render: default; VCL: win

Unconfirmed on ubuntu 16.04 x64 with Version:
Build ID: 726c18db3215ec74135f51365322a6b531f328af
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2018-11-03_19:38:55
Locale: en-US (en_US.UTF-8); Calc: threaded
Comment 2 V Stuart Foote 2019-05-15 05:16:57 UTC
Hmm, not really a regression. From the 6.1.0 release the color value for our RYB scheme named Blue is #2a6099; color value assigned from the standard .SOC (based on the Gossett & Chen ryb2rgb algorithm interpolating RGB vector values corresponding to a RYB inscribed in a tensor--see bug 114719).

The hard coded #0000FF color used for the Data Bar colors is the fully saturated RGB scheme Blue.

The Bar Colors for conditional formatting dialog/configs did not get adjusted to the RYB based standard.soc at 6.1 release, names of which are now localized.

Red behaves, because it uses the #FF0000 color assignment and its name is picked up from the standard.soc -- the Blue does not as its #0000FF does not match the RYB interpolated Hue for Blue of #2a6099--so it gets no name but its hex value.

Probably could point the source used for the Data Bar colors [1] to Standard SOC, but that is likely to also impact the QA unit tests that would need tweaks.

An, alternative, might be for conditional formatting Data Bars to use the RGB centric tonal.soc which assigns the fully saturated RGB.

Otherwise an easy workaround is for user to just use the "tonal" palette (see bug 80196), color values there are meaningful--and visually consistent to handling of conditional formatting.

[1] https://opengrok.libreoffice.org/xref/core/sc/source/ui/condformat/colorformat.cxx?r=e5c3d5f3#77
Comment 3 V Stuart Foote 2019-05-15 05:52:05 UTC
(In reply to V Stuart Foote from comment #2)

And, the actual hard coded color set for maPositiveColor [1] is the color constant COL_LIGHTBLUE -- ( 0x00, 0x00, 0xFF ) [2] 

Option #1 -- Could define a different constant to pick up the blue from standard.soc

Option #2 -- shift UI use of conditional formatting from standard.soc to tonal.soc, i.e. perform a palette change and pick up labeling from tonal.soc

Option #3 -- Could edit the COL_LIGHTBLUE to match the standard.soc (broader potential impact across UI and in unit tests).

IMHO Option #2 seems a better way to correct this--not clear how many unit tests would have to also be tweaked with Option #1, and Option #3 would be kind of invasive.


[1] https://opengrok.libreoffice.org/xref/core/sc/source/ui/condformat/condformatdlgentry.cxx?r=00ae441b#1107
[2] https://opengrok.libreoffice.org/xref/core/include/tools/color.hxx?r=d14d1341#282
Comment 4 V Stuart Foote 2019-05-15 06:05:03 UTC
and dialog is hardcoded here as well...

Comment 5 Heiko Tietze 2019-05-15 06:50:02 UTC
Would prefer #1 since saturated colors are never a good design.
Comment 6 Commit Notification 2019-08-08 08:24:45 UTC
Kovács László Zoltán committed a patch related to this issue.
It has been pushed to "master":


tdf#125288 Databar dialog's entry color was changed to RYB Blue

It will be available in 6.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:

Affected users are encouraged to test the fix and report feedback.