The button looks like a highlighter pen… It is for the very specific and limited purpose of clicking a button in the composer toolbar to insert <mark>this</mark>.
Ctrl-H is the keyboard shortcut you can use in lieu of clicking the button.
In the settings you can override both the Highlighter (background) color an the color of the text in the highlighted portions.
This component is using the medium shade of the highlight color. You can see the exact one in your style guide if you have it enabled in admin-settings-(styleguide enabled or styleguide admin only) the style guide for the theme’s colors is at /styleguide/atoms/colors
Here’s how your style differs (with default settings) from <mark> (which uses a Discourse’s colors variable, making it readable whatever color scheme you chose):
OK this now uses @Canapin’s suggestion to use the built-in <mark> and corresponding CSS defaults.
Also it now provides settings to override both the Highlighter (background) color and the color of the text in the highlighted portions. Thanks to @Lilly for that conditional CSS.
I’m trying to build a json color picker but it’s not working. I just get a blank pop up with a save button.
Maybe I’ll see if a javascript one is possible somehow. The color palette and badge interface have color-picker js functions, but maybe would only work with a plugin.
The color picker JSON setting (in a theme/component) is not working on Discourse, indeed.
I think good practice would be to use Discourse colors variables in general instead of picking arbitrary colors in a theme or component that won’t blend nicely depending on what other themes and colors users chose.
A user made a color picker for the composer some time ago, but I’m not sure the code was released: