WXforum.net
May 19, 2013, 02:49:47 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
Members: 6609  •  Posts: 178258  •  Topics: 18102
Please welcome TargY, our newest member.
Welcome to the the new hosting for WXforum.net.
 
   Home   Help Search Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Thermometer  (Read 442 times)
0 Members and 1 Guest are viewing this topic.
St3althMaster
Member
*
Offline Offline

Posts: 12


WWW
« on: July 10, 2012, 08:47:05 AM »

Hi i was wondering is it possible to change the thermometer colour ie blue for cold and red for hot image and the warm colours too if you get what i mean
Logged
saratogaWX
Administrator
Forecaster
*****
Offline Offline

Posts: 3729


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #1 on: July 10, 2012, 11:09:50 AM »

Possible, yes.. easy, no.

The thermometer.php uses two fixed background images (one for light backgrounds, one for black background), and all the current data (fill of thermometer, high/low+values, unit-of-measure) are drawn on the image before display.  The fixed color/shading of the bulb of the thermometer is built-in the background image.  To have the color change with temperature, you'd need to add drawing of a new bulb image in addition to changing the fill color of the thermometer scale.

There is an alternative thermometer available that uses a rainbow fill pattern, but it only works with some of the weather software (primarily with Weather-Display).

Best regards,
Ken
Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
adrianhudson
Member
*
Offline Offline

Posts: 16



« Reply #2 on: August 15, 2012, 06:30:24 AM »

Slightly different question but related. Is it possible to change the hi/low colours? The dark blue on the grey background is really quite hard to see.
Logged
saratogaWX
Administrator
Forecaster
*****
Offline Offline

Posts: 3729


Saratoga, CA, USA Weather - free PHP scripts


WWW
« Reply #3 on: August 15, 2012, 05:06:27 PM »

The colors change to lighter if used in the template set with the black theme.

You can force the lighter colors by changing thermometer.php
Code:
if (preg_match('|black|i',$CSSstyle) ) {
$invertColor = true;
}
to
Code:
if (true or preg_match('|black|i',$CSSstyle) ) {
$invertColor = true;
}

Best regards,
Ken
Logged

Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.193 seconds with 18 queries.
anything