Rendering a color from a sprite sheet

Hello, I have a problem with a sprite sheet. I started doing a tutorial on YouTube and basically my question is the same as this person here - http://stackoverflow.com/questions/14952863/importing-a-sprite-from-a-sprite-sheet/17820295#17820295 … I tried the advice given there, but there needs to be some more tweaking to the code and I am not sure how some parts of it work in order to fix it. The full code is here - https://github.com/vanZeben/2D-Game-Engine/tree/master/src/ca/vanzeben/game
Basically the code uses a sprite sheet with only 4 colors which are then replaced within the code to form the color displayed. I want it to be able to get the color directly from the sheet and render it.
Any help would be appreciated. :smiley: Thanks!