Adopted Algoritm for RGBtoHSB

Added algoritm instead of library. Rewritten with integers for faster
code.