How do you change ButtonCard Color from a Sensor State

so i have button i using to run a script as a Mometary Switch
so thats
OFF ON OFF = ON
and
OFF ON OFF = OFF
but i wanna be able to change the Button Color ON and OFF but reading a Sensor if its ON or OFF
how can i do that?
as toggle and switch are the same thing
but there is no Option for Mometary switch

can you do like
Sensor.name = ON
Switch.state = On

or something that a toggle will act as a mometary
or is the only way to do is
is a picture and you run a script and change the image by state
or what options are there

ok i figured it out i only had to change entity: from switch to the binary _sensor
and the states values