How to determine color of selected text?

Discuss the word processor
Post Reply
rhimbo
Posts: 72
Joined: Sun Jul 26, 2009 6:27 pm

How to determine color of selected text?

Post by rhimbo »

Hello all,

OOo 4.1.5, Windows 7

How can I configure OOo (or select the correct menu item, button, whatever) to show (indicate) the color of text that is either selected or that is at the location of the cursor? My motivation is that I would like to make arbitrary text the same color as some "examined" text. I would like to determine the precise color of the "examined" text and make the color of my target text that same color.

In MS Word the color dialog (color palette) shows a highlight rectangle around the color of the selected text or text at the cursor. OOo doesn't have such a feature -- at least I have not been able to see it.

In MS Word do the following:
1. Select some text
2. Click the down arrow on the "Font Color" button in the ribbon (menu bar).
3. Select "More Colors..."

Notice that there is a highlight rectangle around the actual color of the highlighted text in the document.

In OOo, do there is no such indication of the actual color.
I've attached two screen grabs to visualize the problem.

How can I determine the precise color so I can make any arbitrary text that color?

Thanks in advance,
Attachments
OOo Writer does not show color of selected text
OOo Writer does not show color of selected text
MS Word shows color of selected text
MS Word shows color of selected text
OOo 4.1.5 on Mac OS X 10.13.3, High Sierra
jrkrideau
Volunteer
Posts: 3816
Joined: Sun Dec 30, 2007 10:00 pm
Location: Kingston Ontario Canada

Re: How to determine color of selected text?

Post by jrkrideau »

How are you setting the colour of the coloured text in the first place?

If you are using a Character Style, you could just check the Style formatting.
LibreOffice 7.3.7. 2; Ubuntu 22.04
Bill
Volunteer
Posts: 8934
Joined: Sat Nov 24, 2007 6:48 am

Re: How to determine color of selected text?

Post by Bill »

Select the character, then on the Menu Bar select Format > Character > Font Effects. The font color of the selected character should be displayed there.
AOO 4.1.14 on Ubuntu MATE 22.04
morchat
Posts: 49
Joined: Wed Dec 26, 2012 6:13 pm
Location: Poland

Re: How to determine color of selected text?

Post by morchat »

This is really poorly resolved in OO.
In the LibreOffice twin project, the color is marked on the palette, as in MS.
There are two methods.
The first is to create a character style with your own name based on the already colored text, and then use that style.
The second is in the colored text fragment, select "Format → Character → Font Effects". In the "Font color" field, a rectangle with the text color and the verbal name of the selected color will appear. When you move the mouse pointer over the color board, the names of the indicated colors appear.
Attachments
181023152548_1.jpg
181023152548_1.jpg (15.89 KiB) Viewed 5874 times
AOO 4.1.7, LibreOffice 6.2.8
Windows 10 64 bits
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: How to determine color of selected text?

Post by John_Ha »

It is tricky. You can use the Format brush to copy the text format and paste that format on your new text.

A few seconds spent testing AOO showed that if you select the coloured text and go Format > Character > Font Effects ..., you are given the name of the colour which is the name you get when you hover the cursor over a colour in the table of colours under Text Colour.
Attachments
Clipboard01.gif
Clipboard01.gif (14.48 KiB) Viewed 5854 times
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
morchat
Posts: 49
Joined: Wed Dec 26, 2012 6:13 pm
Location: Poland

Re: How to determine color of selected text?

Post by morchat »

The best way seems to be the character's style. In the brush method or searching for the color name, you must always go to previously colored text. If you do not remember where it was applied, you must search the document. It takes time, so it's not very effective. The style name can also be the color name..
AOO 4.1.7, LibreOffice 6.2.8
Windows 10 64 bits
rhimbo
Posts: 72
Joined: Sun Jul 26, 2009 6:27 pm

[SOLVED] Re: How to determine color of selected text?

Post by rhimbo »

Hello everyone,

jrkrideau: To answer your question, to set the color I simply clicked the "Font Color" button in the menu ribbon.

I clearly see the names of the colors when I go to Format > Character > Font Effects ..., Thank you to all who enlightened me. I guess I didn't look carefully enough at all the menus...!!

Thank you everyone for your helpful replies. I didn't get the customary email notifying me that there were replies to this thread, hence the delayed response on my part.
;-)

Thanks again everyone....
OOo 4.1.5 on Mac OS X 10.13.3, High Sierra
rhimbo
Posts: 72
Joined: Sun Jul 26, 2009 6:27 pm

Re: How to determine color of selected text?

Post by rhimbo »

Hello all again,

Sorry, I forgot to ask one thing... I know I previously marked this thread [SOLVED] but I thought it simpler to post this final question here instead of starting a new thread so that readers would have better historical context....

I noticed when looking at the font color via the Format > Character > Font Effects ..., menu selection that the color listed was "User". I've attached a screen grab to show.

I could not find the color "User" in the color grid that appears when I select the drop down "Font Color" button on the menu ribbon. Additionally, if I change the color of some text (either text at the cursor or a selection of text) and then re-open the Format > Character > Font Effects ..., menu, I do not see the "User" color anymore. I make no other changes.

I'm wondering if "User" is some default name given to a color that was custom defined and not part of the current style. The two documents I'm examining were originally created on a web site. The document created (prior to my making content and formatting changes, but no modifications to style definitions) has plenty of custom styles. Yet they are all available in the "Styles" dialog. So I can see, for instance, that the color defined for text for one of these styles is in fact "User."

However, I cannot see how to determine the attributes of the color definition, such as the RGB channel values or the values for whatever color model is used. And I can't determine the color model used. How can I find this information so that, if I needed to duplicate it, I could do so?

Thanks again....
Attachments
Color dialog showing color named "User"
Color dialog showing color named "User"
OOo 4.1.5 on Mac OS X 10.13.3, High Sierra
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: How to determine color of selected text?

Post by John_Ha »

Please upload a small document file (eg .odt) showing the problem so that it can be analysed. Use the Upload attachment tab below where you type (128 kB max); or use a file share site, Dropbox or Google Drive for a larger file.

Otherwise I have to guess: perhaps it is text copied from elsewhere which has a colour attribute which is not in the menu used by AOO. See Tools > Options > OpenOffice > Colours ..., where the colours in the Text colours menu are specified. I always wondered why Red seemed to be a little muted - I see the default has significant Green and Blue components as it is [255, 51, 51] and not [255, 0, 0]!
Default Red is [255, 51, 51] and not [255, 0, 0]
Default Red is [255, 51, 51] and not [255, 0, 0]
If you copy something, it is excellent practice to strip all formatting from it before you paste it into AOO. If you do so, the pasted text picks up the formatting at the cursor position and you can then adjust it as required. This also has the benefit of stripping the US English attribute from US text, so that for us Brits, color is flagged as being mis-spelled.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
rhimbo
Posts: 72
Joined: Sun Jul 26, 2009 6:27 pm

Re: How to determine color of selected text?

Post by rhimbo »

Hello John,

Please find attached a small sample file that exhibits the problem. If you right-click on I believe any of the text that looks black except one of them, and select Format -> Character... you will see that the font color (on the "Font Effects" tab) shows the name "User".

Let me know if you have any questions about the file.

Thanks in advance,
Attachments
OOo-forum-posting-example.odt
Example file exhibiting the problem of the font named "User"
(92.79 KiB) Downloaded 112 times
OOo 4.1.5 on Mac OS X 10.13.3, High Sierra
Bill
Volunteer
Posts: 8934
Joined: Sat Nov 24, 2007 6:48 am

Re: How to determine color of selected text?

Post by Bill »

"User" on the Font Effects tab means that the color is not on the color palette. You can use a color picker (I don't know what's available for Macs) to determine the RGB values for the color, then add the color to the palette. A name has to be entered for the color when adding it to the palette. After the color has been added to the palette, that name will be displayed instead of "User" on the Font Effects tab.
AOO 4.1.14 on Ubuntu MATE 22.04
User avatar
Zizi64
Volunteer
Posts: 11362
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: How to determine color of selected text?

Post by Zizi64 »

The NAMES of the colors depend on the used palette. The RGB color method can store 256x256x256 = 16777216 different colors. There is no way to add unique name to each different (mathematically different) color. The human eye can not distinguish between the colors RGB(Hex:33FF11) and RGB(Hex:33FF12).
Therefore the palettes will handle only a few tens (or a few hundreds hundreds) of the colors. They have names, but all of the other colors have not.

The different versions of the OpenOffice.org, Oracle OpenOffice, Apache OpenOffice, LibreOffice, (and MS Office) use different palettes with different list of the colors (and different names). The colors - that have not NAME in the actual palette, and the User defined ones - will be substitute with name "USER" in the actual palette, but the color shade will be descripted by its RGB values.

The LibreOffice can handle more than one palettes. You can switch between the installed palettes.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: How to determine color of selected text?

Post by John_Ha »

Zizi64 wrote:The LibreOffice can handle more than one palettes. You can switch between the installed palettes.
As can AOO. right-click a drawing object > Area > Colours ...
Clipboard01.gif
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
rhimbo
Posts: 72
Joined: Sun Jul 26, 2009 6:27 pm

Re: How to determine color of selected text?

Post by rhimbo »

Bill wrote:"User" on the Font Effects tab means that the color is not on the color palette. You can use a color picker (I don't know what's available for Macs) to determine the RGB values for the color, then add the color to the palette. A name has to be entered for the color when adding it to the palette. After the color has been added to the palette, that name will be displayed instead of "User" on the Font Effects tab.
Bill,

I should have said in my original post that I'm currently on a Windows 7 laptop this week. My profile indicates Mac as that is my usual platform. Sorry about that....

I am not sure how to determine the RGB definition of the color named "User." If I could do that, I could re-create it via the
Tools -> Options -> Colors pane.

How / where can I determine the "color definition" of an arbitrary color, in this case the one named "User"?

Many thanks,
OOo 4.1.5 on Mac OS X 10.13.3, High Sierra
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: How to determine color of selected text?

Post by John_Ha »

rhimbo wrote:How / where can I determine the "color definition" of an arbitrary color, in this case the one named "User"?
I cannot see an easy way but there are many workarounds.

If you extract styles.xml from the .odt file you can see it there. I copied PERSONAL to a new, empty file to minimise colours. I think it is #0e4194 - whatever that means.

Code: Select all

<style:text-properties fo:text-transform="uppercase" fo:color="#0e4194" style:font-name="Arial1" fo:font-size="9pt"
Or save a screen grab and use the colour picker in a graphics editor like IrfanView to measure it - I get [R, G, B] = [14, 65, 148] for the text PERSONAL INFORMATION in your file.

But why do you need to know the colour value?

If you want to create more text the same colour, just use the format brush to format the new text the same colour. It's now the same colour.

If you want to create a graphic the same colour as the unknown text colour, then edit the text to use a colour in the palette and use that colour for all text and the graphic. You might even define your own new colour for both text and graphic.

Or draw a graphic and set it to Wrap in background. Copy the text over the graphic. Now adjust the graphic Area colour until the text merges with the background - it's now the same colour. See below - the rectangle is set to Wrap in the background and I can see text in front of it. When I set the rectangle to Chart 1, the text almost, but not quite, disappears - the text can just be made out. Chart 1 is [0, 69, 134] and I strongly doubt anyone will be able to distinguish it from [14, 65, 148] when seen side by side.
Clipboard01.png
pers.odt
.odt file with graphic and text
(11.62 KiB) Downloaded 130 times
Showing that a problem has been solved helps others searching so, if your problem is now solved, please view your first post in this thread and click the Edit button (top right in the post) and add [Solved] in front of the subject.
Last edited by John_Ha on Sun Oct 28, 2018 5:01 pm, edited 2 times in total.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
rhimbo
Posts: 72
Joined: Sun Jul 26, 2009 6:27 pm

Re: How to determine color of selected text?

Post by rhimbo »

Well, I just tried using the Format Brush on the same document I shared. Either I'm doing something wrong or it's not working. Thinking it was me that was doing something wrong, I did a little searching and followed the numbered instructions in this post at the URL below (the first set of 5 numbered steps):
viewtopic.php?f=7&t=14671#p68921

I added a new line of text in the Default style. At step 4 of the instructions, I clicked. Nothing happened. Upon hitting ESC the format mode ended but nothing changed.
I then tried dragging at step 4 to select a whole word of text. Again nothing happened.

Perhaps I'm using the Fill Format Mode incorrectly...?

By the way, I'm now (for this problem) on Windows 7, OOo 4.1.5.

Thanks,
OOo 4.1.5 on Mac OS X 10.13.3, High Sierra
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: How to determine color of selected text?

Post by John_Ha »

1. Highlight some text
2. click the Format paintbrush.. The cursor changes to a paint tin
3. drag the paint tin across the text to be formatted.
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
morchat
Posts: 49
Joined: Wed Dec 26, 2012 6:13 pm
Location: Poland

Re: How to determine color of selected text?

Post by morchat »

or after pt 1 (above) press F11, select icon of Character styles and choose New style selection -> New style and set name for style.
Now You have new character style with color.
AOO 4.1.7, LibreOffice 6.2.8
Windows 10 64 bits
rhimbo
Posts: 72
Joined: Sun Jul 26, 2009 6:27 pm

Re: How to determine color of selected text?

Post by rhimbo »

Ooh, ouch. That didn't work at all. I followed your instructions precisely. Here's what happened.....

At step 1, I selected text via dragging (button 1 click and move finger along touch pad), and I got the light blue OOo Writer highlight.

At step 2, the cursor changed to the paint can.

At step 3, I dragged the paint can cursor across the highlighted text in step 1 (not sure why I would need to do this if the text was already highlighted from step 1). Upon releasing mouse button 1, the highlight from step 1 disappeared. But my text was the original color. No change.
OOo 4.1.5 on Mac OS X 10.13.3, High Sierra
User avatar
robleyd
Moderator
Posts: 5087
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: How to determine color of selected text?

Post by robleyd »

Perhaps you could have a look at the Help entry for Format Paintbrush which gives a good description of the process.
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
rhimbo
Posts: 72
Joined: Sun Jul 26, 2009 6:27 pm

Re: How to determine color of selected text?

Post by rhimbo »

Well, actually I already did that... hence my posts here in this thread. Furthermore, as you can see from my previous posts in this thread, I even searched the forums for other explanations. They didn't help either. Nor did I find any indication that this feature is not working -- no bug reports that seem current for 4.1.5.
OOo 4.1.5 on Mac OS X 10.13.3, High Sierra
User avatar
robleyd
Moderator
Posts: 5087
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: How to determine color of selected text?

Post by robleyd »

Step 1 seems to me to be Select the text or object whose formatting you want to copy Your description above suggests that you are selecting the target area instead?
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.2.2; SlackBuild for 24.2.2 by Eric Hameleers
User avatar
Zizi64
Volunteer
Posts: 11362
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: How to determine color of selected text?

Post by Zizi64 »

OOo-forum-posting-example.odt
Example file exhibiting the problem of the font named "User"
Fortunatelly, your sample document has been formatted with styles (Paragraph styles and Character styles). The office suite can show which Paragraph/Character style was used for the formatting of a specific part of the document, and you can apply it again and again.

And the LibreOffice 6.1.2 can show the code of the color, applied by the style :
Character style.png
(My AOO 4.1.5 portable version can show only this information about the color: it is an "User" defined color)
Last edited by Zizi64 on Tue Oct 30, 2018 8:32 am, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Bill
Volunteer
Posts: 8934
Joined: Sat Nov 24, 2007 6:48 am

Re: How to determine color of selected text?

Post by Bill »

rhimbo wrote:I am not sure how to determine the RGB definition of the color named "User." If I could do that, I could re-create it via the
Tools -> Options -> Colors pane.

How / where can I determine the "color definition" of an arbitrary color, in this case the one named "User"?
There are many freeware color pickers that can be used to determine the RGB color values for any point on the screen. I haven't used one in Windows for several years, but "Color Cop" comes to mind. Also, the screenshot utility "MWSnap" has a color picker. A Google search will find what's available now.
AOO 4.1.14 on Ubuntu MATE 22.04
John_Ha
Volunteer
Posts: 9584
Joined: Fri Sep 18, 2009 5:51 pm
Location: UK

Re: How to determine color of selected text?

Post by John_Ha »

rhimbo wrote:However, I cannot see how to determine the attributes of the color definition, such as the RGB channel values or the values for whatever color model is used.

And I can't determine the color model used. How can I find this information so that, if I needed to duplicate it, I could do so?
AOO uses the RGB colour model where the RGB colours in the palette are carefully chosen so as to map onto equivalent CMYK values which will be used when the document is printed.

The range of colours available in CMYK is much smaller than the range available in RGB.

See What does the CMYK option in AOO do? How is it used? for a full discussion.
Attachments
Clipboard02.gif
LO 6.4.4.2, Windows 10 Home 64 bit

See the Writer Guide, the Writer FAQ, the Writer Tutorials and Writer for students.

Remember: Always save your Writer files as .odt files. - see here for the many reasons why.
Post Reply