How to use the @microsoft/fast-colors.hslToRGB function in @microsoft/fast-colors

To help you get started, we’ve selected a few @microsoft/fast-colors examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github microsoft / fast-dna / packages / fast-components-react-msft / app / app.tsx View on Github external
private getNeutralPallete(colorSource: string): string[] {
        const color: ColorRGBA64 = parseColor(colorSource);
        const hslColor: ColorHSL = rgbToHSL(color);
        const augmentedHSLColor: ColorHSL = ColorHSL.fromObject({
            h: hslColor.h,
            s: hslColor.s,
            l: 0.5,
        });
        return createColorPalette(hslToRGB(augmentedHSLColor));
    }