|
|
| Author |
Message |
bl243
Joined: 03 Feb 2009 Posts: 19
|
Posted: Sat Nov 28, 2009 4:37 am Post subject: useiconscale behaviour |
|
|
Hi,
I am really getting into weathermap in a big way and have started creating maps using coloured icons for host status with the useiconscale keywords.
Currently I have made my icons black and white, where black is used the scale colour shows and where white is used, it remains white.
However, with a white background this actually makes the icons quite hard to make out.
Is it possible to reverse the logic, so where white is used the colour shows through, and where black is used it remains black.
Or even better offset the logic by a single digit so that RGB 0,0,0 is black, but RGB 1,1,1 -> 255,255,255 is the scale colour fading to white? This would allow you to use black and white and then the scale colour within the icons.
Did any of what I just wrote make sense?
I've attached a screenshot to demonstrate. Left is what I have. Right is what I want to get to.
Thanks.
| Description: |
|
| Filesize: |
9.63 KB |
| Viewed: |
1569 Time(s) |

|
|
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 3772 Location: United Kingdom
|
Posted: Sat Nov 28, 2009 5:55 am Post subject: |
|
|
I've never really used USEICONSCALE. I'll take a look... the colouring is done by a php function though, not weathermap, so I wouldn't hold too much hope that it's that flexible.
depending on your scale (e.g. no gradients) then it might just be easier to make the coloured icons in the gimp/photoshop/paint.net.
|
|
| Back to top |
|
 |
bl243
Joined: 03 Feb 2009 Posts: 19
|
Posted: Sat Nov 28, 2009 5:58 am Post subject: |
|
|
Thanks Howie.
In this instance I am using a gradient scale. But I don't necessarily have to. Its a lot of icons to produce though! =)
|
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 3772 Location: United Kingdom
|
Posted: Sat Nov 28, 2009 7:11 am Post subject: |
|
|
Well there are two other solutions. One looks like it would only work with indexed-colour images (not jpeg, not 24-bit png). The other would work on anything but be quite a bit slower. I'll experiment and see just how slow.
The good news is that both would work on stock GD installs too (e.g. debian, etc), so I could lose a dependency.
|
|
| Back to top |
|
 |
bl243
Joined: 03 Feb 2009 Posts: 19
|
Posted: Sat Nov 28, 2009 5:19 pm Post subject: |
|
|
Indexed colour sounds good. To get the most out of the icon colouring you need a grayscale image anyway - so 256 colour would be plenty!
Perhaps as a SET option to avoid losing the PNG and JPEG support?
|
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 3772 Location: United Kingdom
|
Posted: Sun Nov 29, 2009 7:07 am Post subject: |
|
|
| bl243 wrote: | Indexed colour sounds good. To get the most out of the icon colouring you need a grayscale image anyway - so 256 colour would be plenty!
Perhaps as a SET option to avoid losing the PNG and JPEG support? |
Yeah, I think it will be something like that. This seems like it would be the better default.
|
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 3772 Location: United Kingdom
|
Posted: Sat Jan 02, 2010 12:18 pm Post subject: |
|
|
I just did some playing with this and the results are quite nice. It seems fast enough to work in all cases, and the colourising result is better - black and white preserved, and the colours are less washed out.
It'll be the last new feature in 0.97 (just tracking down a couple of bugs before release).
| Description: |
|
| Filesize: |
2.58 KB |
| Viewed: |
1253 Time(s) |

|
|
|
| Back to top |
|
 |
|