color of a png file

Dashticz, alternative dashboard based on HTML, CSS, jQuery

Moderators: leecollings, htilburgs, robgeerts

Post Reply
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

color of a png file

Post by pvklink »

Hi i try to change the coler oa an internal image, that possible ?

blocks[86] = {title: 'Rolluik', hide_data: true, width: 4, imageOff: 'curtainclosed.png', imageOn: 'curtainopen.png'} //, speak: 'Rolluik is
gewijzigd'


I tried all of these below...

Code: Select all


.fa-curtainclosed.on {color: gold;}
.fa-curtainclosed.off {color: gold;}
.fa-curtainopen.on {color: gold;}
.fa-curtainopen.off {color: gold;}

.fa-curtainclosed {color: gold;}
.fa-curtainclosed {color: gold;}
.fa-curtainopen {color: gold;}
.fa-curtainopen {color: gold;}

.block_86 .on {
  color:gold;
}

.block_86 .off {
  color:gold;
}

.fas.fa-curtainclosed {
    color: gold
}
.fas.fa-curtainopen {
    color: gold
}

Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
User avatar
HansieNL
Posts: 964
Joined: Monday 28 September 2015 15:13
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: color of a png file

Post by HansieNL »

The image is an .png file and it is not simple to change the color by css. Only font and svg icons can be simply changed by css.
The easiest way is to edit the images and put them in the custom folder and load them from there. I changed the images to have an golden look. If you like them you can save them to your Dashticz custom folder.

imageOff: '../custom/curtainclosed_gold.png',
imageOn: '../custom/curtainopen_gold.png
curtainopen_gold.png
curtainopen_gold.png (1.75 KiB) Viewed 362 times
curtainclosed_gold.png
curtainclosed_gold.png (2.92 KiB) Viewed 362 times
Blah blah blah
pvklink
Posts: 822
Joined: Wednesday 12 November 2014 15:01
Target OS: Raspberry Pi / ODroid
Domoticz version: latest b
Contact:

Re: color of a png file

Post by pvklink »

yes, that did work !
Thanks Hansie
Raspberry (raspbian on rpi 3) , Domoticz Beta, dzVents , RFXtrx433e, P1, Hue, Yeelight, Zwave+, X10, ESP(easy), MQTT,Weather Underground, System Alive Checker, Domoticz Remote Server to RPI with Google Assistant,
Jablotron connection, Ikea
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest