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

Is it possible to make work?

1626710902

Edited 1626711171
CKenny
Sheet Author
So I added buttons to use the WeaponArc API made by The Aaron  in my sheet,  and for some reason it's impossible to get the value from a color input, so I had to make a predefined list of colours (that I had to expand twice following players and GMs demands) So anyway my question is, as said in the title, is it possible to make <input type='color' /> work? P.S. : here is my Arcs button if anyone is interested < div   class = 'sheet-arc_container'   title = 'The GM need to install the WeaponArc API in the game API setting page' >      < button            class = 'sheet-clear sheet-button_top_padding'          type = 'roll'          name = 'arc'          value = "!weapon-arc --add ?{degrees|30} ?{Range|20}m @{arc_color}"      >    Create Arc      </ button >      < select   name = "attr_arc_color"   class = 'sheet-arc_color sheet-init_field' >          < option   value = "#FF0000"   style = " background-color: #FF0000; " > Red </ option >          < option   value = "#228B22"   style = " background-color: #228B22; " > Green </ option >          < option   value = "#4161E1"   style = " background-color: #4161E1; " > Blue </ option >          < option   value = "#FFFF00"   style = " background-color: #FFFF00; " > Yellow </ option >          < option   value = "#FF00FF"   style = " background-color: #FF00FF; " > Fuchsia </ option >          < option   value = "#00FFFF"   style = " background-color: #00FFFF; " > Cyan </ option >          < option   value = "#FFA500"   style = " background-color: #FFA500; " > Orange </ option >          < option   value = "#00FF00"   style = " background-color: #00FF00; " > Lime </ option >          < option   value = "#FFC0CB"   style = " background-color: #FFC0CB; " > Pink </ option >      </ select >      < button            class = 'sheet-clear sheet-button_top_padding'          type = 'roll'          name = 'arc-clear'          value = "!weapon-arc --clear"      >    Clear Arcs      </ button > </ div > Edit : Somehow Roll20 removed the entirety of <input type='color' /> from the title, instead of escaping the brackets
1626711900
vÍnce
Pro
Sheet Author
I'm guessing that using the "color" attribute on input's ie <input type = "color" is a DOM related feature that just isn't accessible/allowed in roll20's environment. ;-(
1626712245
Andreas J.
Forum Champion
Sheet Author
Translator
I've tried it woth both CSE and legacy sheet, didn't work. Pretty sure it cant be used in Roll20.
Thanks for the answers It's a shame that it doesn't work I guess the Players and GMs will have to content themselves with the limited list of colours
1626712859
vÍnce
Pro
Sheet Author
CKenny said: Thanks for the answers It's a shame that it doesn't work I guess the Players and GMs will have to content themselves with the limited list of colours Just keep reminding them they didn't have any color options before.  lol
will do
1626717701
Finderski
Pro
Sheet Author
Compendium Curator
You could do a text input and let them enter whatever color code they want in there...?
1626726843
Andreas J.
Forum Champion
Sheet Author
Translator
Finderski said: You could do a text input and let them enter whatever color code they want in there...? How would you turn that user input into CSS affecting the sheet? I know there is a trick that can make this work with roll templates, but making it work on the sheet doesn't immediately  strike me as straightforward.
1626730229

Edited 1626730285
vÍnce
Pro
Sheet Author
If @{arc_color} is simply being used to feed a color to the WeaponArc script, Finderski's suggestion seems like a great solution.  Too bad we can't use the built-in color picker though. ;-(
maybe, I'll try on a test server see how they feel about it