Skip to content

Instantly share code, notes, and snippets.

@petamoriken
Created October 18, 2023 01:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petamoriken/2fba4817666391f12ede8ff6d4b361e8 to your computer and use it in GitHub Desktop.
Save petamoriken/2fba4817666391f12ede8ff6d4b361e8 to your computer and use it in GitHub Desktop.
const imageData = context.getImageData(0, 0, 1, 1, {
colorSpace: "display-p3",
colorType: "float32",
});
console.log(imageData.data); // Float32Array [1.0, 0.0, 0.0, 1.0]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment