AddLabel Labels & Text Color In ThinkOrSwim

TOSUser21

New member
When I use the AddLabel ChartLabels function to add a text box in the top left corner of the chart when certain conditions are met, the text color inside the Label is white and is difficult to read with the chart's white background. Is there a way to change the color of the text inside the Label? When I use similar code for Bubbles, the text inside the bubbles defaults to Black. Here is an example of the code that I am trying to change: AddLabel(ChartLabels == 1 and Label and Test, “Positive”, Color.YELLOW).

Thank you in advance for your feedback!
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

The label text will always be black for dark mode and white for light mode. Don't think there's anyway around that. Best option is to pick background colors that work best with a white font (darker colors). Keep in mind you can create whatever colors you like using the CreateColor functions:

CreateColor ( double red, double green, double blue);

You can use a site such as https://image-color.com/color-picker to find the RGB values to plug in.
 
Last edited by a moderator:
I am 100% clueless about this stuff over here

Can someone please advice on how to change this font to black. I've tried everything I can to search for threads with same question but I can't find anything. I even tried doing it my self by editing source but again, I have no idea how ToS scripts work. Thank you in advance for the help!
https://usethinkscript.com/threads/...ist-scan-label-for-thinkorswim.970/#post-7899

As you can see the font inside these boxes are greyish and hard to see. I'd like to change it to black. They are on my main chart.
G4i6psD.jpg


I can't find anything within the code to change the actual font color.


Thank you for your help.
 
Last edited by a moderator:
As you can see the font inside these boxes are greyish and hard to see. I'd like to change it to black.
On the ToS platform, the text (font) color inside chart labels and chart bubbles cannot be changed.
Changing the background color of the Labels can provide greater contrast for better readability.

To change the LABEL color
Look for statements in your script that begin with ADDLABEL.

Dark mode members tend to prefer brighter hues.
example found here:
https://usethinkscript.com/threads/...rategy-for-thinkorswim.3722/page-2#post-77231
s42ynhx.png

ToS Color constants available:
https://tlc.thinkorswim.com/center/reference/thinkScript/Constants/Color
You can use any of the colors in the reference above or create custom colors


I can't find anything within the code to change the actual font color.
The ToS platform does not provide the ability to change the FONT color.
The only workaround was to change the BACKGROUND of the LABEL color to a bright hue.
As a dark mode user, You would never change your label background to: Color.Black, as you saw that will black out your label.
Try the opposite: Color.White
 
Last edited:
On the ToS platform, the text color inside chart labels and chart bubbles cannot be changed.
Changing the background color of the Labels can provide greater contrast for better readability.

To change the LABEL color
Look for statements in your script that begin with ADDLABEL.

Dark mode members tend to prefer brighter hues.
example found here:
https://usethinkscript.com/threads/...rategy-for-thinkorswim.3722/page-2#post-77231
s42ynhx.png

ToS Color constants available:
https://tlc.thinkorswim.com/center/reference/thinkScript/Constants/Color
You can use any of the colors in the reference above or create custom colors
Serendipity that you posted this today. I've not worked on thinkscript for a while. So today I had the idea that I wanted to create a chart label for relative volume that changes colors based on how high the relative volume is. I have something similar in a watchlist column. Are you saying this is not possible with chart labels? TIA
 
Serendipity that you posted this today. I've not worked on thinkscript for a while. So today I had the idea that I wanted to create a chart label for relative volume that changes colors based on how high the relative volume is. I have something similar in a watchlist column. Are you saying this is not possible with chart labels? TIA
Yes, if you can use the logic from your watchlist to setup chart labels. The ADDLABEL() function controls the BACKGROUND colors of LABELS on your chart.
No, you cannot change the font color inside the chart label.
 
Last edited:

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
529 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top