# Color palette for text?

**URL:** <https://community.wolfram.com/t/color-palette-for-text/18065>\
**Category:** Questions\
**Tags:** ui-ux-and-ide\
**Created:** [May 7, 2021, 5:56pm UTC](https://community.wolfram.com/t/color-palette-for-text/18065 "2021-05-07T17:56:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sinvalos](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sinvalos](https://community.wolfram.com/u/sinvalos)\
**Post date:** [May 7, 2021, 5:56pm UTC](https://community.wolfram.com/t/color-palette-for-text/18065/1 "2021-05-07T17:56:21Z")

</div>

Does anyone know how to build a color palette? To apply a color to a text, we must go to the Format, Text Color menu and click on the desired color. I would like to create a palette that would make this operation faster and more practical.

Good weekend.

---

<div class="post-metadata">

**Author:** ![gdelfino](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/gdelfino/32/41294_2.png) [@gdelfino](https://community.wolfram.com/u/gdelfino)\
**Post date:** [May 7, 2021, 6:49pm UTC](https://community.wolfram.com/t/color-palette-for-text/18065/2 "2021-05-07T18:49:10Z")

</div>

This is how I do it. First define this function to that you can apply or insert a color with a single button:

```
colorPasteButton = Button[" ",
    ib := InputNotebook[];
    If[NotebookRead[ib] === {}, Paste[ib, #], 
     FrontEndExecute[{FrontEndToken[ib, FontColor, #]}]],
    Appearance -> "Palette", Background -> #, ImageSize -> Full] &;

```

Then, create your palette in the notebook, for example:

```
Pane[
 Grid[
  {
   {Tooltip[colorPasteButton[Black], "Black 100%"],
    Tooltip[colorPasteButton[GrayLevel[0.15]], "Black 85%"],
    Tooltip[colorPasteButton[GrayLevel[0.50]], "Black 50%"],
    Tooltip[colorPasteButton[GrayLevel[0.75]], "Black 25%"],
    Tooltip[colorPasteButton[GrayLevel[0.85]], "Black 15%"]}
   },
  ItemSize -> {2, 1}, Alignment -> Left, Spacings -> {.1, 0}],
 FrameMargins -> 5] 

```

Then convert it to a palette:

```
CreatePalette[%]

```

And finally go to the Palettes menu, and select “Install palette”.

If interested in learning more about the colorPasteButton see:  
[https://mathematica.stackexchange.com/questions/95243/paste-set-color-with-a-single-button-for-palettes?form=MY01SV&OCID=MY01SV](https://mathematica.stackexchange.com/questions/95243/paste-set-color-with-a-single-button-for-palettes?form=MY01SV&OCID=MY01SV)

---

<div class="post-metadata">

**Author:** ![sinvalos](https://avatars.discourse-cdn.com/v4/letter/s/439d5e/32.png) [@sinvalos](https://community.wolfram.com/u/sinvalos)\
**Post date:** [May 8, 2021, 11:13am UTC](https://community.wolfram.com/t/color-palette-for-text/18065/3 "2021-05-08T11:13:43Z")

</div>

Thank you for your response and attention Gustavo.
