Skip to content

Instantly share code, notes, and snippets.

@andreyvolosyuk
Last active January 16, 2020 19:10
Show Gist options
  • Save andreyvolosyuk/af9983d1f41eacdc4bcb82423c684899 to your computer and use it in GitHub Desktop.
Save andreyvolosyuk/af9983d1f41eacdc4bcb82423c684899 to your computer and use it in GitHub Desktop.
let color = parseInt('ff10fe', 16);
console.log(color);
console.log([
color >> 16 & ((1 << 8) - 1),
color >> 8 & ((1 << 8) - 1),
color >> 0 & ((1 << 8) - 1),
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment