Bug 40436 - Custom colours in Math
Summary: Custom colours in Math
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
3.3.3 release
Hardware: Other All
: medium enhancement
Assignee: dante19031999
URL:
Whiteboard: target:7.1.0 target:7.0.0.1
Keywords:
: 130779 133072 (view as bug list)
Depends on:
Blocks: Formula-Editor
  Show dependency treegraph
 
Reported: 2011-08-28 08:55 UTC by v_2e
Modified: 2020-06-25 20:12 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description v_2e 2011-08-28 08:55:19 UTC
Hello!
  LibreOffice Math supports only few pre-defined colours to use in the equation. It is very inconvenient itself, but moreover the colours defined there are too dark to be used for usual tasks (at least, in my case).

  It would be nice to have an ability to use custom colours in equations, and it looks like a lot of people wish such a feature.
  Here is the corresponding OOo bug: http://openoffice.org/bugzilla/show_bug.cgi?id=5156

  Regards,
    Vladimir
Comment 1 Björn Michaelsen 2011-12-23 12:40:00 UTC Comment hidden (obsolete)
Comment 2 Florian Reisinger 2012-08-14 14:00:09 UTC Comment hidden (obsolete)
Comment 3 Florian Reisinger 2012-08-14 14:01:17 UTC Comment hidden (obsolete)
Comment 4 Florian Reisinger 2012-08-14 14:06:02 UTC Comment hidden (obsolete)
Comment 5 Florian Reisinger 2012-08-14 14:08:03 UTC Comment hidden (obsolete)
Comment 6 Ruslan Kabatsayev 2013-01-01 01:26:20 UTC
It seems the bug is still present. At least I've not found any evidence that there's a way to use custom colors in LO Math.
(I'm using Version 4.1.0.0.alpha0+ (Build ID: 6869aaa2b36316e50b512e0ba4819743d834cea)).
Comment 7 Christophe Strobbe 2013-08-13 18:52:18 UTC
The new URL of the corresponding Apache OpenOffice bug is https://issues.apache.org/ooo/show_bug.cgi?id=5156.
Comment 8 José Guilherme Vanz 2013-11-02 22:51:00 UTC
@marcos, do you have implemented it right?
Comment 9 Marcos Souza 2013-11-03 14:40:50 UTC
(In reply to comment #8)
> @marcos, do you have implemented it right?

No, what I did was introducing a more easy way to users can change the colors of the formula.

We need to take a look in the code for trying to extend to more colors...
Comment 10 Gerry 2014-10-31 08:37:08 UTC
It seems that a first step is made with regards to custom colours in Math:

http://cgit.freedesktop.org/libreoffice/core/commit/?h=aoo/trunk&id=529e59d90037748d0030191b93252e597935243e

Now, 16 colours are possible instead of 8. 

However, I think it is not yet accessible from the UI, is it? (I mean the left formula bar in Math which shows the eight colours)
Comment 11 Regina Henschel 2014-10-31 12:11:16 UTC
I have no build system for LibreOffice (I'm still on MSVC 2008) and Apache OpenOffice does not have this side pane. Therefore I could not adapt the pane in my patch.

The patch is about the named colors on MathML. The #rrggbb and #rgb cases are still missing. But 16 colors are better then 8 ;)
Comment 12 Gerry 2014-11-10 11:35:28 UTC
@Regina: thanks for the increase to 16 colors in Math. Marcos Souza has put them to the Math elements bar, so they will be accessible from the UI in LibreOffice 4.4. See here: https://wiki.documentfoundation.org/ReleaseNotes/4.4#Color_support

There might be a small bug, though: Magenta and Fuchsia look exactly the same. On screen and PDF output one cannot tell a difference. Also, Cyan and Aqua are the same. Do you also see this problem on your system?
Comment 13 Regina Henschel 2014-11-10 14:18:41 UTC
They must be the same, see table in http://www.w3.org/TR/SVG/types.html#ColorKeywords. The table handles more color names than allowed in MathML, but W3C holds naming consistent throughout the standards, only some standards have more names than others. We should follow the color names used by W3C.

I have kept cyan and magenta in the UI although they do not belong to the color names allowed in MathML, because that names are used in StarMath, and people are nowadays used to that names because of inks in color printer.
Comment 14 Roman Kuznetsov 2015-12-01 19:57:22 UTC
in 4.4 was added 16 HTML colors for Math. this is not enough? =)
Comment 15 Tobias Hemm 2017-02-06 20:24:21 UTC
In my opinion, and for my use, it is definitely not enough.
LibreOffice is great program; I use it for desktop publishing. And in this case, it is a great downside that the colors for formulas are limited and not precisely customizable.

In the OpenOffice-Bugzilla (https://bz.apache.org/ooo/show_bug.cgi?id=5156), Mathias Bauer (Comment 12) wrote that it would be possible to use RGB values, and he asked if that was what users want. – I would say: Definitely!

benji2, in Comment 13, suggested a "hex-tuple like #FFCC00". I think this would be good, as well.

Is it possible to implement one – or even both – of these ways?
Comment 16 Shunesburg69 2019-03-27 00:55:29 UTC
Some news ?
Comment 17 Heiko Tietze 2020-02-20 13:17:30 UTC
*** Bug 130779 has been marked as a duplicate of this bug. ***
Comment 18 Heiko Tietze 2020-02-20 13:18:35 UTC
Please also allow hexadecimal values. Currently you can enter something like "color red 1 = color blue 2" but not "color #FF0000 1 = color #0000FF 2". See bug 130779.
Comment 19 jonasbeckerx3 2020-02-20 17:08:35 UTC
(In reply to Heiko Tietze from comment #18)
> Please also allow hexadecimal values. Currently you can enter something like
> "color red 1 = color blue 2" but not "color #FF0000 1 = color #0000FF 2".
> See bug 130779.

I would prefer a sytax like this too.
Comment 20 Regina Henschel 2020-05-15 20:04:53 UTC
*** Bug 133072 has been marked as a duplicate of this bug. ***
Comment 21 Commit Notification 2020-06-24 10:01:53 UTC
dante committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e7fee907fa8240c742bd8f6268768d1acad2774f

tdf#40436 tdf#47914 RGB personalized color for math and laplace symbol 2

It will be available in 7.1.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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 22 Commit Notification 2020-06-24 16:59:40 UTC
dante committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/bcec35810326c09dccac168e0411c5bb42475732

tdf#40436 tdf#47914 RGB personalized color for math and laplace symbol 2

It will be available in 7.0.0.1.

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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 23 Roman Kuznetsov 2020-06-24 17:14:47 UTC
Would be cool add info about it into our Help, Olivier?
Comment 24 dante19031999 2020-06-24 21:47:15 UTC
Hi. I'm the coder.
I do not know how to change the help, but the syntax is:
rgb r g b { "text" }
Example: rgb 0 100 0 { "text" }
Does not suppor #00FF00 mode because # is already used for matrix separator.

It should be enaought for the help.
Comment 25 Roman Kuznetsov 2020-06-25 20:12:17 UTC
(In reply to dante19031999 from comment #24)
> Hi. I'm the coder.

It's awesome!

> Example: rgb 0 100 0 { "text" }

color rgb 0 100 0 { "text" } - it works!

So verified, thanks Dante