On Sun, 25 Jun 2017 06:33:56 -0700
Thomas Keffer <[email protected]> wrote:

> There's an example in the Wiki
> <https://github.com/weewx/weewx/wiki/Colored%20UV%20index> of how to
> do this, but I don't think it's particularly efficient.
> 
> A search list extension would probably be the most elegant. Then you
> could do something like:
> 
>   <tr>
>     <td class="stats_label">UV</td>
>     <td class="stats_data" style="background-color:
> $UV_color($current.UV.raw)">$current.UV
> $UV_text($current.UV.raw)</td> </tr>
> 
> The functions $UV_color() and $UV_text() would return an appropriate
> color and warning, respectively, depending on their argument. An
> elegant touch would be for $UV_text() to get its strings out of
> skin.conf, making it easy to internationalize the text.


as the author of the Wiki example, I'm not a coder so I had no intention
to create efficiency.
Overwrite my example when you have an elegant solution, and I can copy
that.

Liz

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to