I’ve created a custom plugin to export my Figma variables.
I have an opacity variable that is set to 0.8

However, when I export it, it gets exported with a value of 0.800000011920929
const variable = await figma.variables.getVariableByIdAsync(variableId);
const { name, valuesByMode } = variable;
console.log({name});
console.log({valuesByMode});

When I use “nicer” numbers, like 0.25
, 0.5
, 0.75
or 1
, the rounding error does not happen, but it does with pretty much any other numbers.