Using Alpha Channel in Custom Colors?

J

JabronLames

Member
VIP
Hi Guys,

So you can create a custom color in thinkscript using SetDefaultColor(CreateColor(R,G,B)); When you access the color of the input in the Study Settings...you are manually able to swap the color mode to RGBA/CMYK/etc. Does anyone know if there is a way to access this functionality via thinkscript?


#Creating a boring RGB color Example:

plot Price = close;
Price.SetDefaultColor(CreateColor(255, 220, 210));

Price.SetDefaultColor(CreateColor(RGBA(255, 220, 210, 100))); # Doesn't work
Price.SetDefaultColor(CreateColor(255, 220, 210, 100)); # Doesn't work
 
BenTen

BenTen

Administrative
Staff
VIP
This should work:

Price.SetDefaultColor(CreateColor(255, 220, 210));
 
J

JabronLames

Member
VIP
Hey BenTen.

The code does work, I included it in the original post.

My question was in regards to adjusting the channel/mode of the RGB to include an alpha layer/transparency/opacity.

Have you ever seen an example of a color like that? TOS allows for these color channels to be set manually, but I have yet to find how to mimic these colors in ThinkScript.
 
BenTen

BenTen

Administrative
Staff
VIP
@JabronLames Ahh I see, in that case, I don't think so.
 

Similar threads

Top