import { adjustHue, hexToHSL, hslToHex } from './Utils.Common';
// Function to generate a triadic color palette
export function generateTriadicPalette(baseHex, adjustment) {
    const baseHSL = hexToHSL(baseHex);
    const triadicHSL = adjustHue(baseHSL, adjustment);
    const palette = {};
    // Define the steps
    const steps = [
        0,
        50,
        100,
        200,
        300,
        400,
        500,
        600,
        700,
        800,
        900
    ];
    steps.forEach((step) => {
        // eslint-disable-next-line prefer-const
        let [h, s, l] = triadicHSL;
        if (step === 0) {
            l = 1; // White
        }
        else {
            // Gradually decrease lightness for other steps
            l = 1 - (step / 1000);
        }
        palette[`${step}`] = hslToHex(h, s, Math.max(0, Math.min(1, l)));
    });
    return palette;
}
//# sourceMappingURL=Utils.Triadic.js.map