The rgb declaration needs to be in quotes, so you need to add quote around it (they have to be escaped). You could use the Quote() function as well:
<body bgcolor=\"rgb(" &
& "," &
& "," &
Be aware that the bgcolor isn't supported in html 5 so you may want to use css instead:
so you need to add quote around it (they have to be escaped)
Or instead just use single quotes… but CSS (without quotes!) works just fine:
background-color: rgb(" & Untitled::R & "," & Untitled::G & "," & Untitled::B & ");
Here is a old sample I created using a webviewer. Dropbox - RGBcolorSample.fmp12
While I was search for my sample I found another sample that I had download from the internet and I don't know who created it, but it does not use a webviewer. Dropbox - ColourSwatch.fmp12
Maybe one of these samples will help.
Thank you for your help. Both worked as needed. I chose erolst's CSS method.
There is a border or some padding around the RGB color that is being shown in the web viewer. Can that be eliminated?
There is a border or some padding around the RGB color that is being shown in the web viewer
That's should be the FileMaker padding around the WV object, adjustable in the Inspector.
The white boarder can't be adjust out with the inspector, you will have to adjust in your html. My sample database has two webviewer, one with the boarder and the other without. Take a look at the html in my sample database.
Sorry, though I had the modification to hide the boarder in my sample databases, after reviewing I noticed it was not there. Here is the html you need to add
I will try to update my sample database with the fix.
My sample database has it added to it now.