def get_dur_file_colorMode_and_charMode(f):
    """ Returns the color mode and encoding used by the file """
    f.seek(0)
    try:
        loadedMovieData = json.load(f)
    except Exception as e:
        return False
    colorMode = loadedMovieData['DurMovie']['colorFormat']
    try:
        charEncoding = loadedMovieData['DurMovie']['encoding']
    except Exception as e:
        charEncoding = 'utf-8'
    # convert from file format 5 to 6
    #if colorMode == 'xterm-256':
    #    colorMode = '256'
    if charEncoding == 'Utf-8':
        charEncoding = 'utf-8'
    return colorMode, charEncoding
 Returns the color mode and encoding used by the file 
durdraw/durdraw_file.py