#pragma once

#include <string>

#include <imgui.h> 
                   
namespace VE::func
{
  inline auto name(std::string n)
  {
    return "##" + n;
  }

  inline ImU32 color(std::string hex, unsigned char alpha = 255) 
  {
    if (hex[0] == '#') hex.erase(0, 1);

    unsigned int r = 255;
    unsigned int g = 255;
    unsigned int b = 255;

    if (hex.length() == 6) std::sscanf(hex.c_str(), "%2x%2x%2x", &r, &g, &b);

    return IM_COL32(r, g, b, alpha);
  }
}
