#include <Color/Color.hpp>

glm::vec4 Color::action(0.0154f, 0.452f, 0.0154f, 1.0f);
glm::vec4 Color::faded(0.2176f, 0.2176f, 0.2176f, 1.0f);
glm::vec4 Color::warning(0.8f, 0.8f, 0.03f, 1.0f);
glm::vec4 Color::danger(0.452f, 0.0154f, 0.0154f, 1.0f);
glm::vec4 Color::shadow(0.0f, 0.0f, 0.0f, 0.7f);
glm::vec4 Color::solidShadow(0.07f, 0.07f, 0.07f, 1.0f);
glm::vec4 Color::focused(1.0f, 1.0f, 1.0f, 1.0f);
glm::vec4 Color::disabled(0.4f, 0.4f, 0.4f, 1.0f);
glm::vec4 Color::selection(0.0f, 0.2176f, 0.2176f, 1.0f);
glm::vec4 Color::secondarySelection(0.07f, 0.2176f, 0.07f, 1.0f);
glm::vec4 Color::availableItem(0.05f, 1.0f, 0.05f, 1.0f);
glm::vec4 Color::unavailableItem(1.0f, 0.05f, 0.05f, 1.0f);
glm::vec4 Color::rechargeHighlight(1.0f, 0.2176f, 0.0f, 1.0f);
glm::vec4 Color::inputHighlight(1.0f, 1.0f, 0.0f, 1.0f);
glm::vec4 Color::upgradeHighlight(0.0f, 1.0f, 1.0f, 1.0f);
glm::vec4 Color::reactorHighlight(1.0f, 0.2176f, 0.1f, 1.0f);
glm::vec4 Color::negativeStat(1.0f, 0.0f, 0.0f, 1.0f);
glm::vec4 Color::positiveStat(0.0f, 1.0f, 0.0f, 1.0f);
glm::vec4 Color::fuelHighlight(1.0f, 0.0f, 0.0f, 1.0f);
glm::vec4 Color::fuelStat(1.0f, 0.5f, 0.0f, 1.0f);
glm::vec4 Color::progressBackground(0.0063f, 0.0063f, 0.0063f, 1.0f);
glm::vec4 Color::progressBar(0.0707f, 1.0f, 0.0707f, 1.0f);
glm::vec4 Color::toolUsesLeftHigh(0.0707f, 1.0f, 0.0707f, 1.0f);
glm::vec4 Color::toolUsesLeftMedium(0.4563f, 0.4563f, 0.0f, 1.0f);
glm::vec4 Color::toolUsesLeftLow(1.0f, 0.0707f, 0.0707f, 1.0f);
glm::vec4 Color::batteryTipCharged(0.2176f, 1.0f, 0.2176f, 1.0f);
glm::vec4 Color::batteryTip(0.531f, 0.531f, 0.531f, 1.0f);
glm::vec4 Color::batteryCharge(0.6121f, 1.0f, 0.6121f, 1.0f);
glm::vec4 Color::batterySubglow(0.0154f, 1.0f, 0.0154f, 1.0f);
glm::vec4 Color::widgetBackground(0.1f, 0.0063f, 0.1f, 1.0f);
glm::vec4 Color::tabBackground(0.0f, 0.0f, 0.0f, 0.7f);
glm::vec4 Color::innerBackground(0.0f, 0.0f, 0.0f, 0.5f);
glm::vec4 Color::textInput(0.4563f, 0.4563f, 0.4563f, 1.0f);
glm::vec4 Color::temperature(1.0f, 0.0063f, 0.0063f, 1.0f);
glm::vec4 Color::frameBackground(0.1f, 0.1f, 0.15f, 0.7f);
glm::vec4 Color::error(0.8f, 0.0f, 0.0f, 1.0f);
glm::vec4 Color::success(0.0f, 0.8f, 0.0f, 1.0f);
glm::vec4 Color::sectionBackground(0.0f, 0.0f, 0.0f, 0.4f);
glm::vec4 Color::scrollPanelBackground(0.0f, 0.1f, 0.1f, 0.4f);
glm::vec4 Color::tableRowEven(0.3f, 0.3f, 0.3f, 0.1f);
glm::vec4 Color::tableRowOdd(0.7f, 0.7f, 0.7f, 0.1f);
glm::vec4 Color::popupBackground(0.0f, 0.05f, 0.0f, 1.0f);
glm::vec4 Color::hoverColor(1.0f, 1.0f, 1.0f, 0.05f);
glm::vec4 Color::toolPower(1.0f, 0.4f, 0.0f, 1.0f);
glm::vec4 Color::back(0.7f, 0.35f, 0.0f, 1.0f);
glm::vec4 Color::progressTodo(0.1f, 0.0f, 0.1f, 1.0f);
glm::vec4 Color::progressDone(0.8f, 0.8f, 0.1f, 1.0f);
glm::vec4 Color::navLink(0.0f, 0.7f, 0.8f, 1.0f);
glm::vec4 Color::itemEmphasis(1.0f, 0.7f, 0.0f, 1.0f);
glm::vec4 Color::itemCountEmphasis(1.0f, 0.0f, 0.2f, 1.0f);
glm::vec4 Color::menuEmphasis(0.0f, 0.5f, 0.8f, 1.0f);
glm::vec4 Color::actionEmphasis(0.1f, 0.5f, 0.0f, 1.0f);
glm::vec4 Color::reset(0.05f, 0.05f, 0.9f, 1.0f);
glm::vec4 Color::cmdEcho(1.0f, 1.0f, 0.5f, 1.0f);
glm::vec4 Color::help(0.0f, 0.2f, 0.8f, 1.0f);
glm::vec4 Color::mapChunkLoading(0.5f, 0.5f, 0.5f, 1.0f);
glm::vec4 Color::equipmentHighlight(0.0f, 0.2f, 0.0f, 1.0f);
glm::vec4 Color::gadgetBackground(0.0f, 0.0f, 0.0f, 0.5f);
glm::vec4 Color::oilHighlight(1.0f, 0.0f, 0.0f, 1.0f);
glm::vec4 Color::petrolHighlight(1.0f, 1.0f, 0.0f, 1.0f);
glm::vec4 Color::blockSelectionTintEnabled(0.0f, 0.3f, 0.0f, 0.4f);
glm::vec4 Color::blockSelectionTintDisabled(0.5f, 0.0f, 0.0f, 0.7f);

glm::vec4 Color::tint(glm::vec4 color)
{
    return glm::vec4(
        std::min(color.r * 1.4f, 1.0f),
        std::min(color.g * 1.4f, 1.0f),
        std::min(color.b * 1.4f, 1.0f),
        color.a
    );
}

glm::vec4 Color::shade(glm::vec4 color)
{
    return glm::vec4(
        std::max(color.r * 0.6f, 0.0f),
        std::max(color.g * 0.6f, 0.0f),
        std::max(color.b * 0.6f, 0.0f),
        color.a
    );
}