How to extract a color from a text?

Hi,
in LO 4.0.3 I have the problem that I have a text in a specific color, that
appears as 'user color' in the font color box.
I cant bring this color to another text, as this user color is not available
when selecting the other text (right mouse button -> Symbol (Zeichen)

Any idea how to extract the font color and make it available for all text?

Thanks!

Ideally, you would want to save this as a new colour in your colour table: it would then appear as an available colour, as you request. I don't see that there is any way to do this.

Here are two ideas:

o Put the cursor in your coloured text.
o Click the Format Paintbrush icon in the Standard toolbar.
o Drag the paintbrush over the new text. To avoid painting the paragraph formatting as well, hold down Ctrl whilst you release the mouse after the drag.

o Put the cursor in your coloured text.
o Go to Format | Styles and Formatting or click the Styles & Formatting button in the Formatting toolbar or press F11.
o Click Character Styles.
o Click New Style from Selection | New Style from Selection.
o Give your new character style a name.
You now have a character style with the captured colour, which you can apply to other text in the normal way.

I trust this helps.

Brian Barker

Hello!

Any idea how to extract the font color and make it available for all
text?

  This problem often happens to me as well, but I have not figured out
the solution so far. I believe, this question belongs to
http://ask.libreoffice.org since it has all the potential to be brought
up again and again in the future.

  Regards,
    Vladimir

There might be an easier way, but if you use an unzip file to look at the zip'd contents of a .odt file, you'll find content.xml. In there will be style definitions that include colours specified in hexadecimal. For example, from a little test file that I made:

<style:style style:name="T4" style:family="text"><style:text-properties fo:color="#008000"/></style:style>
<text:span text:style-name="T4">green</text:span>

You can then use Tools > Options > LibreOffice > Colours
to add any desired colour to your GUI.

Is this what you wanted?

- Robert

Hi all:

  I think in Calc you can use copy and paste special (Select only
format).

  In Writer you can select the word or letter that have the color you
need to know. Then you can go to Menu - Format -Character- Font Color
and there you can see the Number of the color (Grafico 10 -in spanish in
my case as example). Now you can find it in the icon of the color
select ... there you can see the number when you put the pointer of the
mouse on each color.

Regards,

Jorge Rodríguez

jorge wrote:

In Writer you can select the word or letter that have the color you
need to know. Then you can go to Menu - Format -Character- Font Color
and there you can see the Number of the color (Grafico 10 -in spanish in
my case as example). Now you can find it in the icon of the color
select ... there you can see the number when you put the pointer of the
mouse on each color.

Yes, that works for colors that are known to the system, not for custom
colors (like in imported documents)

Thx/Axel

Try this: Open the Styles and Formatting window (use the F11 key to do this). Select the word or letter that has the color you need to know. Right click the paragraph style that is highlighted in this window. Select Modify in the context menu. Then click the Organizer tab. The RGB values are listed in the "Contains" section.

--Dan

Splendid! But sadly I think this works only if the colour was (sensibly) originally applied as a paragraph style, not if it was applied, say, as local character formatting.

Brian Barker

Obviously, you tried my idea, and found it does not work very well.
      So, lets try it another way. Use LibreOffice to save the text document as a HTML document. Then open the html document with a text editor. There you should find the font color property contains the color in hex format. You then have to convert this to RGB before you can create a new color in Tools > LibreOffice > Colors.

--Dan

Hi :slight_smile:
Smart!  I was going to suggest using Gimp's (or Photoshop's) "Colour picker" but getting it directly from an html document might be a lot faster and reliable and easier to figure out quickly. 
Regards from
Tom :slight_smile:

Brian Barker schrieb:

Yes, that works for colors that are known to the system, not for
custom colors (like in imported documents)

Try this: Open the Styles and Formatting window (use the F11 key to do
this). Select the word or letter that has the color you need to know.
Right click the paragraph style that is highlighted in this window.
Select Modify in the context menu. Then click the Organizer tab. The
RGB values are listed in the "Contains" section.

Splendid! But sadly I think this works only if the colour was
(sensibly) originally applied as a paragraph style, not if it was
applied, say, as local character formatting.

That work in such cases too, but you have to make a character style from the selected word, not a paragraph style. You will find the RGB-code in the organizer tab. And you can use this new style immediately to color other portions of the text without the need to define the color.

Kind regards
Regina

It appears that you can create a custom style that is either a character or paragraph style using the Styles and Formatting window and the "New Style from Selection" tool in it. If you select a word, the style will be a character style. If you select an entire paragraph, it will be a paragraph style. In either case, the RGB values appear in the Organizer tab for the style.
      So you have a choice as to which type of style you create depending upon your needs.
      And if you want to add this style to your Default template, there was a thread on copying styles from one document to another.

--Dan