1

In LibreOffice Writer Search&Replace I can find by format.
In advanced options I press the Format button and select a format (e.g. Font colour = green).

With Find field left empty, Find Next/Find Previous presses jump on all text occurrences with the same green, regardless on the content.

Is anything like this possible on web pages using a browser (optimally Google Chrome or Firefox)?

1 Answer 1

0

While it is technically possible, it has not been implemented, nor would it likely be made.

The HTML font color attribute can work in 3 different ways.

First there is the ability to set a color by a name:

<font color="red">This is some text!</font>

This would be the easiest way to search for a specific color, but it is limited to 140 named colors.

The next two methods of setting a font color are the following:

hex_number Specifies the text color with a hex code (like "#ff0000")

rgb_number Specifies the text color with an rgb code (like "rgb(255,0,0)")

As you can see, this greatly increases the number of colors to be set. 16,581,375 colors to be exact.

While rgb(255,0,0) would be pure red, the web developer might use rgb(250,10,5) to get a particular shade of red.

So what can you do? Well, since now you know how font colors are set, you can look at the HTML source of a web page and find the string of text that sets the color you are looking for and then search the source for that string. Not as useful as using the webpage itself, but better than nothing.

1
  • Thanks for the answer. It makes sense. On the other hand, when I copy&paste the webpage content to the LibreOffice Writer, the format-based search works there fine. A browser extension should probably be able to do the same. (I need to find changes in long online documents where changes are marked with those named colours.) Commented Oct 5, 2017 at 14:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .