/rgbint

helper function to pack/unpack RGBA values from an Integer.

Primary LanguageTypeScript

[![TypeScript version][ts-badge]][typescript-4-0] [![Node.js version][nodejs-badge]][nodejs] [![MIT][license-badge]][license]

A simple example packing and unpacking RGBA values in a 32 bit integer

This is intetended as a simple example showing methods for reading and writing separate bytes in a 32 bit integer, and how it is a common and useful method to store values such as RGB colors and IP-adresses in integers.