Get current Light bulb color for style

I am using “My-Slider-V2” and I would like to use the current color (and maybe even bigness) of the light bulb.
Is there an rather easy method, to get that done like this here? So I could get the RGB Value.

- border-color: |
    [[[
        if (entity.state == "off") return "red";
        else return "green";
    ]]]