Why does this not work? Variables, Class/ID and Stylesheets

Twine 2.3.5 and Sugar Cube 2.30.0

Can anyone help me figure out why B works and not A? Thanks.


The reason why is probably that the first parameter of the hsl() function is a number from 0 to 360, and the hue-rotate() function takes either a 0, or 0deg to 360deg, 0grad to 400grad, 0rad to 6.2832rad, 0turn to 1turn per the (see the CSS angle type).

So, try something like this instead:

<<run $("img#ucarcolour").css("filter", "hue-rotate(" + $CarColour + "deg)")>>

Hope that helps! :slight_smile:

1 Like

Wow thank you, I could’ve sworn id tried that but it works so thanks! lol