This commit is contained in:
Kyle Isom 2019-04-23 18:28:52 -07:00
parent ebb8172551
commit 7b34ef9819
1 changed files with 8 additions and 0 deletions

8
pe/rgb.erl Normal file
View File

@ -0,0 +1,8 @@
-module(rgb).
-export([pack16/1, unpack16/1]).
pack16({Red, Green, Blue}) ->
<<Red:5, Green:6, Blue:5>>.
unpack16(<<Red:5, Green:6, Blue:5>>) ->
{Red, Green, Blue}.