Hello Pat. Thank you for your answer. I think you mean this one. I had made various changes, but without success. Which variables do I have to use there? Do not see any color in the wind.
See this: https://www.meteo-oberwallis.ch/wetter/glis/user/ // Change the color of the windSpeed_kph variable function update_windSpeed_kph( wind ) { outTemp = parseFloat( wind ).toFixed(0); // Convert back to decimal literal if ( wind <= 0 ) { jQuery(".curwindspeed").css( "color", "#1278c8" ); } else if ( wind <= -3.8 ) { jQuery(".curwindspeed").css( "color", "#30bfef" ); } else if ( wind <= 0 ) { jQuery(".curwindspeed").css( "color", "#1fafdd" ); } else if ( wind <= 4.4 ) { jQuery(".curwindspeed").css( "color", "rgba(0,172,223,1)" ); } else if ( wind <= 10 ) { jQuery(".curwindspeed").css( "color", "#71bc3c" ); } else if ( wind <= 12.7 ) { jQuery(".curwindspeed").css( "color", "rgba(90,179,41,0.8)" ); } else if ( wind <= 18.3 ) { jQuery(".curwindspeed").css( "color", "rgba(131,173,45,1)" ); } else if ( wind <= 21.1 ) { jQuery(".curwindspeed").css( "color", "rgba(206,184,98,1)" ); } else if ( wind <= 23.8 ) { jQuery(".curwindspeed").css( "color", "rgba(255,174,0,0.9)" ); } else if ( wind <= 26.6 ) { jQuery(".curwindspeed").css( "color", "rgba(255,153,0,0.9)" ); } else if ( wind <= 29.4 ) { jQuery(".curwindspeed").css( "color", "rgba(255,127,0,1)" ); } else if ( wind <= 32.2 ) { jQuery(".curwindspeed").css( "color", "rgba(255,79,0,0.9)" ); } else if ( wind <= 35 ) { jQuery(".curwindspeed").css( "color", "rgba(255,69,69,1)" ); } else if ( wind <= 43.3 ) { jQuery(".curwindspeed").css( "color", "rgba(255,104,104,1)" ); } else if ( wind >= 43.4 ) { jQuery(".curwindspeed").css( "color", "rgba(218,113,113,1)" ); } } Am Samstag, 31. August 2019 15:03:59 UTC+2 schrieb Pat: > > The code doesn't exist in the skin as it is right now, but it would be > easy to add. > > Create a new function in the belchertown.js.tmpl file for the wind speed > and the colors you want. You could copy something like this for the > temperature > <https://github.com/poblabs/weewx-belchertown/blob/master/skins/Belchertown/js/belchertown.js.tmpl#L87-L120>. > > Then have the wind speed go through that function > <https://github.com/poblabs/weewx-belchertown/blob/master/skins/Belchertown/js/belchertown.js.tmpl#L793-L804> > > to change it's color. Use the temperature live section > <https://github.com/poblabs/weewx-belchertown/blob/master/skins/Belchertown/js/belchertown.js.tmpl#L751-L755> > > for an example of this. > > On Saturday, August 31, 2019 at 5:53:06 AM UTC-4, Stefan wrote: >> >> Hello. >> I have a question. Can the wind speed in Belchertown also be colored? eg >> from 40 km yellow and from 80 red and from 120 purple? I mean in live >> view. >> >> [image: Unbenannt.PNG] >> >> Thanks for Help >> >> >> -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/097832b9-8b60-4fb5-ab57-00cd96f89cb8%40googlegroups.com.
