How do you add color to an input?

Discuss macro implementations, ask for macro help (to share your creations, see User Creations, probably either Campaign Frameworks or Drop-in Resources).

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice

Post Reply
Idward
Kobold
Posts: 22
Joined: Sat Dec 08, 2012 8:11 pm

How do you add color to an input?

Post by Idward »

I am trying to change the text color in the status pop up, however I am not able to figure it out. I am hoping someone could give me some insight on how to do this properly. The idea is that each line has its own color.

Code: Select all

[status = input(
   "count_proficiency|0|<font color=yellow>How many PROFICIENCY dice?</font>|TEXT",
   "count_ability|0|<font color=green>How many ♦ABILITY dice?</font>|TEXT",
   "count_boost|0|<font color=blue>How many ∎BOOST dice?</font>|TEXT",
   "count_challenge|0|<font color=red>How many CHALLENGE dice?</font>|TEXT",
   "count_difficulty|0|<font color=purple>How many ♦DIFFICULTY dice?</font>|TEXT",
   "count_setback|0|How many ∎SETBACK dice?|TEXT"
)]
[abort(status)]

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: How do you add color to an input?

Post by aliasmask »

You have to surround the html with <html>. I also recommend using a <div> or <table> because the color will only be on the text.

Idward
Kobold
Posts: 22
Joined: Sat Dec 08, 2012 8:11 pm

Re: How do you add color to an input?

Post by Idward »

That is what I want. I want the "How many PROFICIENCY dice?" to show up as yellow. Do I need to turn the input to a table?

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: How do you add color to an input?

Post by aliasmask »

Code: Select all

[status = input(
   "count_proficiency|0|<html><font color=yellow>How many PROFICIENCY dice?</font></html>|TEXT",
...
OR

Code: Select all

[status = input(
   "count_proficiency|0|<html><div bgcolor=black color=yellow width=300>How many PROFICIENCY dice?</div></html>|TEXT",
...
or whatever kind of formatting you like. You can also use style attributes instead of the deprecated html attributes.

If you're not familiar with html formatting then I recommend http://www.w3schools.com/ to play around with it.

Idward
Kobold
Posts: 22
Joined: Sat Dec 08, 2012 8:11 pm

Re: How do you add color to an input?

Post by Idward »

Ah! Now I understand what you meant, thank you!

Post Reply

Return to “Macros”