<script lang="ts">
	import chroma from 'chroma-js';

	export let option: { label: string; color: string };
	export let idx;
</script>

<div style={`--color: ${chroma(option.color).rgb().join(',')}`}>
	{option.label}
</div>

<style lang="scss">
	div {
		color: rgb(var(--color));
		padding: 10px;
		&:hover {
			background-color: rgba(var(--color), 0.2);
		}
	}
</style>
