0👍
Not sure if this is what you’re after, but you could do something like this:
<script setup>
const bgColor = '#ff00ff'; // Replace with a computed, a function return a value, etc.
</script>
<template>
<div :style="{ backgroundColor: bgColor }"></div>
</template>
Source:stackexchange.com