Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Help Creating Table with Color defined by Player Color

1426624632

Edited 1426624643
My group is presently using the default table for all of our attacks/powers. While that's good and all, we would like it if we could change the header color. By default it's purple. But my user color is green, while another player's is magenta, and so forth. Is it possible to write a bit of HTML defining a table that is identical to the default table, except that it looks for the user's color before displaying? What would it look like?
It isn't possible without the api.
With the Default Template? no. With a template built into a character sheet like 5e, yes (assuming the creator of the sheet setup different styles like the 5e one) Even if you don't use the actual sheet; having one associated with your campaign lets you reference the Templates associated with it. For example, the 5e sheet has differently colored headers based on the class of action (save, weapon, deathsave, check, spell, etc) It woudn't be customizable to the point of specifying your own colors, but there's enough variety to accomodate 5 people or so.
Doesn't matter if you use a custom sheet or not. You absolutely cannot get the player color at this time.
1426630235
Gen Kitty
Forum Champion
Player color, for whatever reason, is reserved for API scripts.
Right, but if you're using a template that uses "red, dark red, purple, green, grey" headers, you can just have your players use those colors. It's not automatic or locked in or anything, but from a purely organizational/style perspective, it's entirely viable to have Player1 use red templates and Player2 use Green, etc. in their macros.
GenKitty said: Player color, for whatever reason, is reserved for API scripts. I'm sure a helper or something is going to be added for it at some point.
So, what if each character sheet had an attribute called, say, "color" and the HTML could maybe read the sheet for that attribute value to put it out per usage?
The template would have to be specifically coded with the CSS to do that(and I'm not even sure you can have style values called from a value like that or if it needs to be predefined anyway). The "default" template that you're currently using definitely doesn't work like that in either case. Unless you're creating your own custom sheet; none of the available ones do this. (though that would be an awesome feature to implement for personal macros if doable) What I was suggesting earlier was to artificially "assign" your players to a specific color that's already supported in a particular character sheet template ( using Dungeons and Dragons 5e as an example here ) and have them construct their macros in such a way as to stick with their assigned color. For example, you might tell player1 to use Green. They would change their avatar color to match it, for consistency. Their own macros would look something like: &{template:5eDefault} {{weapon=1}} {{title=Player1}} {{freetext=some text or roll here}} You could then tell player 2 to use Red. They would change their avatar color to match it for consistency. Their own macros would look something like: &{template:5eDefault} {{save=1}} {{title=Player2}} {{freetext=some text or roll here}} Like I mentioned; it's vary manual, but ultimately every player would indeed have assigned colors and their macros would reflect that. (for reference, I believe the 5e sheet uses "check" or unspecified for grey, "save" for red, "weapon" for green, "deathsave" for deep crimson, "spell" for purple, and "ability" for cyan.)