 TODO: Description
         *
         * @param h
         * @param s
         * @param l
         * @param a
         */
        setDrawColorHsl = (h, s, l, a = 1) => {

            const hsl = {
                h: h,
                s: s,
                l: l,
                a: a
            };


            this.setDrawColor(hsl);
        }

        /**
         * TODO: Description
         *
         * @param h
         * @param s
         * @param v
         * @param a
         */
        setDrawColorHsv = (h, s, v, a = 1) => {
            const hsv = {
                h: h,
                s: s,
                v: v,
                a: a
            };

            this.setDrawColor(hsv);
        }

        /**
         * Set an individual pixel.
         *
         * @param x
         * @param y
         */
        setPixel = (inX, inY) => {
            inX = Math.round(inX);
            inY = Math.round(inY);

            let x = 0;
            let y = 0;

            switch(this.#orientation) {
                case 0:
                    x = inX;
                    y = inY;
                    break;
                case 90:
                    x = this.#pxlH - inY - 1;
                    y = inX;
                    break;
                case 180:
                    x = this.#pxlW - inX - 1;
                    y = this.#pxlH - inY - 1;
                    break;
                case 270:
                    x = inY;
                    y = this.#pxlW - inX - 1;
                    break;
            }

            if(x < 0 || y < 0 || x >= this.#originalPxlW || y >= this.#originalPxlH) return false;

            const pixel = y * this.#originalPxlW + x;

            this.#buffer[pixel * 3] = this.#buffer[pixel * 3] * (1-this.#colorA) + this.#colorA * this.#colorR;
            this.#buffer[pixel * 3 + 1] = this.#buffer[pixel * 3 + 1] * (1-this.#colorA) + this.#colorA * this.#colorG;
            this.#buffer[pixel * 3 + 2] = this.#buffer[pixel * 3 + 2] * (1-this.#colorA) + this.#colorA * this.#colorB;
        }

        /**
         * Returns the color of a given pixel.
         *
         * @param {number} x - TODO:
         * @param {number} y - TODO:
         * @returns {{r: {number}, b: {number}, g: {number}}} colorRgb
         */
        getPixel = (x, y) => {
            const pixel = Math.round(y) * this.#originalPxlW + Math.round(x);

            return {
                r: this.#buffer[pixel * 3],
                g: this.#buffer[pixel * 3 + 1],
                b: this.#buffer[pixel * 3 + 2]
            }
        }

        /**
         * Draws a filled box at location `x, y` of width `w` and height `h`.
         *
         * @param x
         * @param y
         * @param w
         * @param h
         */
        fillBox = (x, y, w, h) => {
            x = Math.round(x);
            y = Math.round(y);
            w = Math.round(w);
            h = Math.round(h);

            for (let i = 0; i < h; i++) {
                for (let j = 0; j < w && j + x < this.#originalPxlW; j++) {
                    this.setPixel(x + j, y + i);
                }
            }
        }

        pngDraw = (file, x = 0, y = 0, w = 64, h= 64) => {

            const data = fs.readFileSync(file);
            let myImage = PNG.sync.read(data);

            const width  = Math.min(w, myImage.width);
            const height = Math.min(h, myImage.height);



            for (let yPos = 0; yPos < height; yPos++) {
                for (let xPos = 0; xPos < width; xPos++) {

                    const r = myImage.data[(xPos + yPos*myImage.width)*4];
                    const g = myImage.data[(xPos + yPos*myImage.width)*4+1];
                    const b = myImage.data[(xPos + yPos*myImage.width)*4+2];
                    const a = myImage.data[(xPos + yPos*myImage.width)*4+3];

                    //this.debug('r:'+r+'  g:'+g+'  b:'+b+'  a:'+a);

                    this.setDrawColor(r, g, b, a/255);
                    this.setPixel(xPos + x, yPos + y)
                }
            }

        }

        /**
         * Gets the font array TODO: this is hard coded in, can we load a file
         *
         * @returns {fontArray}
         */
        setFont = (fontName = 'default') => {
            //TODO check to see if file exists first...
            const newFont = require('./fonts/'+fontName+'.js');

            this.#fontArray = []; // Reset existing
            this.#fontArray = newFont;
        }

        text = (text, x, y, style = '') => {
            // Sanitize data
            text = '' + text;
            x = Math.round(x);
            y = Math.round(y);

            let cursor = 0;
            let biggestY = 0;

            for (let i = 0; i < text.length; i++) {
                let character = this.#fontArray[text.charCodeAt(i)];
                if(typeof character == "undefined") character = this.#fontArray[0xFF];
                if(typeof character == "undefined") character = [];

                const len = character.length;

                for (let col = 0;  col < len; col++) {
                    let column = character[col];

                    let bit = 0;
                    let lower = 0;

                    while (bit < 8) {
                        if(bit == 0 && column & 0x01) {
                            //lower the whole letter but dont set any pixels
                            lower = 2;
                        } else {

                            if (column & 0x01) {
                                if(bit + lower > biggestY) biggestY = bit + lower;
                                switch(style) {
                                    case '3d':
                                        // 3D text
                                        this.setPixel(x + cursor - 1, (bit - 1 + y) + lower+1);
                                        break;
                                    case 'outline':
                                        // outline
                                        this.fillBox(x + cursor - 1, (bit - 1 + y) + lower - 1,3,3);
                                        break;
                                    default:
                                        // normal text
                                        this.setPixel(x + cursor, (bit - 1 + y) + lower);
                                }

                            }
                        }

                        bit++;
                        column = column >> 1;
                    }
                    cursor++;
                }
                cursor++;
            }

            return {w: cursor-1, h: biggestY};
        }

        /**
         * Returns the height and width of a string if it were to be drawn in the current font.
         *
         * @param {string} text - The string to be measured.
         * @returns {{w: number, h: number}} -
         */
        textBounds = (text) => {
            // TODO - instead of calling text, do something more efficient!
            return this.text(text, 100, 100);
        }


        /* --- Input --- */

        /**
         * Clear touch and button data
         */

        clearInputs = () => {
            //stops button presses persisting between apps.
            this.getTouch();

            this.#buttons = {
                topLeft: false,
                leftTop: false,
                topRight: false,
                rightTop: false,
                rightBottom: false,
                bottomRight: false,
                bottomLeft: false,
                leftBottom: false
            