# Path: neuropsydia/core.py
# def color(color):
#     """
#     Returns an RGB color tuple (or list) from its name.
# 
#     Parameters
#     ----------
#     color = str
#         one from the color_list list
# 
#     Returns
#     ----------
#     tuple or list
# 
#     Example
#     ----------
#     >>> import neuropsydia as n
#     >>> n.start()
#     >>> print(n.color_list)
#     >>> print(n.color("blue"))
#     >>> n.close()
# 
#     Authors
#     ----------
#     Dominique Makowski
# 
#     Dependencies
#     ----------
#     None
#     """
#     if isinstance(color,str):
#         try:
#             return(color_list[color])
#         except:
#             print("NEUROPSYDIA WARNING: color() was used, however the argument " + str(color) + " was not detected and might cause errors.")
#             return(color)
#     else:
#         return(color)


from .path import *
from .core import *
from .core import color as core_color  # avoid conflict with arg name

    Example
    ----------
    >>> import neuropsydia as n
    >>> n.start()
    >>> n.write('here is my title', style='title')
    >>> n.write('here is my text', font_color='red')
    >>> n.write('press ENTER to quit', style='end')
    >>> n.close()

    Notes
    ----------
    *Authors*

    - Dominique Makowski (https://github.com/DominiqueMakowski)
    - Léo Dutriaux (https://github.com/LeoDutriaux)

    *Dependencies*

    - pygame
    """
    if fast is True:
        size = int(size*screen_width/35.0)
        x, y = Coordinates.to_pygame(x=x, y=y)
        if style != 'body':
            font = Font.get(style, size)
        elif non_latin is False:
            font = Font.get('RobotoRegular.ttf', size)
        else:
            font = Font.get('NotoSansCJKtc-Regular.otf', size)

# Path: neuropsydia/core.py
# def color(color):
#     """
#     Returns an RGB color tuple (or list) from its name.
# 
#     Parameters
#     ----------
#     color = str
#         one from the color_list list
# 
#     Returns
#     ----------
#     tuple or list
# 
#     Example
#     ----------
#     >>> import neuropsydia as n
#     >>> n.start()
#     >>> print(n.color_list)
#     >>> print(n.color("blue"))
#     >>> n.close()
# 
#     Authors
#     ----------
#     Dominique Makowski
# 
#     Dependencies
#     ----------
#     None
#     """
#     if isinstance(color,str):
#         try:
#             return(color_list[color])
#         except:
#             print("NEUROPSYDIA WARNING: color() was used, however the argument " + str(color) + " was not detected and might cause errors.")
#             return(color)
#     else:
#         return(color)


# Path: neuropsydia/write.py
from .path import *
from .core import *
from .core import color as core_color  # avoid conflict with arg name


    Example
    ----------
    >>> import neuropsydia as n
    >>> n.start()
    >>> n.write('here is my title', style='title')
    >>> n.write('here is my text', font_color='red')
    >>> n.write('press ENTER to quit', style='end')
    >>> n.close()

    Notes
    ----------
    *Authors*

    - Dominique Makowski (https://github.com/DominiqueMakowski)
    - Léo Dutriaux (https://github.com/LeoDutriaux)

    *Dependencies*

    - pygame
    """
    if fast is True:
        size = int(size*screen_width/35.0)
        x, y = Coordinates.to_pygame(x=x, y=y)
        if style != 'body':
            font = Font.get(style, size)
        elif non_latin is False:
            font = Font.get('RobotoRegular.ttf', size)
        else:
            font = Font.get('NotoSansCJKtc-Regular.otf', size)

        surface = font.render(text, True, core_color(color))