async def METHOD_NAME(self, ctx, section: str, color: Union[discord.Color, str]):
    """Set rank color.
    For section, you can choose: `exp`, `info` or `all`.
    For color, you can use: `default`, `white`, `HEX code` (#000000) or `auto`.
    e.g: `[p]lvlset rank color info white`"""
    user = ctx.author
    userinfo = await self.db.users.find_one({"user_id": str(user.id)})
    section = section.lower()
    default_info_color = (30, 30, 30, 200)
    white_info_color = (150, 150, 150, 180)
    default_exp = (255, 255, 255, 230)
    default_rep = (92, 130, 203, 230)
    default_badge = (128, 151, 165, 230)
    default_a = 200
    if await self.config.guild(ctx.guild).text_only():
        await ctx.send("Text-only commands allowed.")
        return
    # get correct section for db query
    if section == "exp":
        section_name = "rank_exp_color"
    elif section == "info":
        section_name = "rank_info_color"
    elif section == "all":
        section_name = "all"
    else:
        await ctx.send("Not a valid section. Must be `exp`, `info` or `all`")
        return
    # get correct color choice
    if color == "auto":
        if not all(module in modules for module in ("numpy", "scipy.cluster")):
            await ctx.send("Missing required package. Autocolor feature unavailable")
            return
        if section == "exp":
            color_ranks = [random.randint(2, 3)]
        elif section == "info":
            color_ranks = [random.randint(0, 1)]
        elif section == "all":
            color_ranks = [random.randint(2, 3), random.randint(0, 1)]
        hex_colors = await self._auto_color(ctx, userinfo["rank_background"], color_ranks)
        if section == "all":
            set_color = [await self._hex_to_rgb(color, default_a) for color in hex_colors]
        else:
            set_color = hex_colors[0]
    elif color == "white":
        set_color = white_info_color
    elif color == "default":
        if section == "exp":
            set_color = default_exp
        elif section == "info":
            set_color = default_info_color
        elif section == "all":
            set_color = [
                default_exp,
                default_rep,
                default_badge,
                default_info_color,
            ]
    elif isinstance(color, discord.Color):
        set_color = (color.r, color.g, color.b, default_a)
    else:
        await ctx.send("Not a valid color. Must be `default`, `HEX color`, `white or `auto`.")
        return
    if section == "all":
        if isinstance(color, discord.Color):
            await self.db.users.update_one(
                {"user_id": str(user.id)},
                {
                    "$set": {
                        "rank_exp_color": set_color,
                        "rank_info_color": set_color,
                    }
                },
            )
        elif color == "default":
            await self.db.users.update_one(
                {"user_id": str(user.id)},
                {
                    "$set": {
                        "rank_exp_color": default_exp,
                        "rank_info_color": default_info_color,
                    }
                },
            )
        elif color == "auto":
            await self.db.users.update_one(
                {"user_id": str(user.id)},
                {
                    "$set": {
                        "rank_exp_color": set_color[0],
                        "rank_info_color": set_color[1],
                    }
                },
            )
        await ctx.send("Colors for rank set.")
    else:
        await self.db.users.update_one(
            {"user_id": str(user.id)}, {"$set": {section_name: set_color}}
        )
        await ctx.send("Color for rank {} set.".format(section))