Assigning colors to data bound color inputs
I have this code:
function setupColorPickers(stageVM) {
[
{ picker: elements.colorPickers.eye, modelKey: "Eye Color" },
{ picker: elements.colorPickers.brow, modelKey: "Eyebrow-Eyelash Color" },
{ picker: elements.colorPickers.lip, modelKey: "Lips Color" },
].forEach(({ picker, modelKey }) => {
picker.addEventListener("input", ({ target: { value } }) => {
// `value` is "#rrggbb". We append "FF" for full alpha → "rrggbbFF",
// then parse to an integer 0xrrggbbFF:
const hex8 = value.slice(1) + "FF";
const intColor = Number.parseInt(hex8, 16);
stageVM.color(modelKey).value = intColor;
});
});
}but this results in color being offset in hue…
not sure what I am doing wrong…