# How to use multiple colours in title text

**URL:** <https://community.plotly.com/t/how-to-use-multiple-colours-in-title-text/65785>\
**Category:** 📊 Plotly Python\
**Created:** [July 5, 2022, 9:30pm UTC](https://community.plotly.com/t/how-to-use-multiple-colours-in-title-text/65785 "2022-07-05T21:30:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Plodding](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@Plodding](https://community.plotly.com/u/Plodding)\
**Post date:** [July 5, 2022, 9:30pm UTC](https://community.plotly.com/t/how-to-use-multiple-colours-in-title-text/65785/1 "2022-07-05T21:30:56Z")

</div>

Hello,

I know how to set specific words to bold using HTML tags. Is there some way to set individual colours?

Thank you

---

<div class="post-metadata">

**Author:** ![kelly\_gfc](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/kelly_gfc/32/19181_2.png) [@kelly\_gfc](https://community.plotly.com/u/kelly_gfc)\
**Post date:** [July 5, 2022, 9:36pm UTC](https://community.plotly.com/t/how-to-use-multiple-colours-in-title-text/65785/2 "2022-07-05T21:36:22Z")

</div>

You can add a style tag like so: style={“color”: “blue”}. Here is some documentation: [Dash HTML Components | Dash for Python Documentation | Plotly](https://dash.plotly.com/dash-html-components)

---

<div class="post-metadata">

**Author:** ![Plodding](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@Plodding](https://community.plotly.com/u/Plodding)\
**Post date:** [July 5, 2022, 9:48pm UTC](https://community.plotly.com/t/how-to-use-multiple-colours-in-title-text/65785/3 "2022-07-05T21:48:14Z")

</div>

Thank you. I am setting subplot title text as:

` fig['layout']['annotations'][i]["text"] = "blah"`

That requires actual text… I am assuming I have to use this…?:

```auto
from dash import html

html.Div([
    html.Div('Example Div', style={'color': 'blue', 'fontSize': 14}),
    html.P('Example P', className='my-class', id='my-p-element')
], style={'marginBottom': 50, 'marginTop': 25})

```

Just need a bit more of a nudge 🙂

---

<div class="post-metadata">

**Author:** ![kelly\_gfc](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/kelly_gfc/32/19181_2.png) [@kelly\_gfc](https://community.plotly.com/u/kelly_gfc)\
**Post date:** [July 5, 2022, 9:51pm UTC](https://community.plotly.com/t/how-to-use-multiple-colours-in-title-text/65785/4 "2022-07-05T21:51:11Z")

</div>

Looks like you can do: fig.update\_annotations(color= “blue”). Check out this thread for info: [Setting Subplot Title Font Sizes](https://community.plotly.com/t/setting-subplot-title-font-sizes/46612)

---

<div class="post-metadata">

**Author:** ![Plodding](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@Plodding](https://community.plotly.com/u/Plodding)\
**Post date:** [July 5, 2022, 9:53pm UTC](https://community.plotly.com/t/how-to-use-multiple-colours-in-title-text/65785/5 "2022-07-05T21:53:22Z")

</div>

Thanks Kelly,

My use-case is a little different I want my text to be like : “Blue…Red…Green” in the same line

---

<div class="post-metadata">

**Author:** ![kelly\_gfc](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/kelly_gfc/32/19181_2.png) [@kelly\_gfc](https://community.plotly.com/u/kelly_gfc)\
**Post date:** [July 5, 2022, 10:26pm UTC](https://community.plotly.com/t/how-to-use-multiple-colours-in-title-text/65785/6 "2022-07-05T22:26:43Z")

</div>

Ah! My apologies. Read too quickly the first time. I haven’t done this before. I’ll try some stuff though and see if I can figure it out!

---

<div class="post-metadata">

**Author:** ![Plodding](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@Plodding](https://community.plotly.com/u/Plodding)\
**Post date:** [July 5, 2022, 11:54pm UTC](https://community.plotly.com/t/how-to-use-multiple-colours-in-title-text/65785/7 "2022-07-05T23:54:14Z")

</div>

Many thanks Kelly

---

<div class="post-metadata">

**Author:** ![AnnMarieW](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@AnnMarieW](https://community.plotly.com/u/AnnMarieW)\
**Post date:** [July 6, 2022, 12:34am UTC](https://community.plotly.com/t/how-to-use-multiple-colours-in-title-text/65785/8 "2022-07-06T00:34:07Z")

</div>

You might find this post helpful: [Multiple color in title text - #3 by atharvakatre](https://community.plotly.com/t/multiple-color-in-title-text/64067/3)

---

<div class="post-metadata">

**Author:** ![Plodding](https://avatars.discourse-cdn.com/v4/letter/p/a183cd/32.png) [@Plodding](https://community.plotly.com/u/Plodding)\
**Post date:** [July 6, 2022, 1:45am UTC](https://community.plotly.com/t/how-to-use-multiple-colours-in-title-text/65785/9 "2022-07-06T01:45:23Z")

</div>

Great! that works. Many thanks.
