public Color convertToColor(SquareColor color) {
        if (color == null) {
            return Color.WHITE;
        }
        switch (color) {
            case BLUE:
                return Color.BLUE;
            case RED:
                return Color.RED;
            case YELLOW:
                return Color.YELLOW;
            case GRAY:
                return Color.GRAY;
            case GREEN:
                return Color.GREEN;
            case ORANGE:
                return Color.ORANGE;
            case BLACK:
                return Color.BLACK;
            default:
                return Color.WHITE;
        }
    }