ixfx
    Preparing search index...
    • Converts from some CSS-representation of colour to a structured OkLch format.

      fromCss(`yellow`);
      fromCss(`rgb(100,200,90)`);
      fromCss(`#ff00ff`);

      By default returns a OkLchScalar (relative) representation. Use the flag 'scalar:true' to get back OkLchAbsolute.

      Type Parameters

      • T extends Partial<
            {
                ensureSafe: boolean;
                fallbackColour: OkLch;
                fallbackString: string;
                scalar: boolean;
            },
        >

      Parameters

      • value: string
      • options: T

      Returns T extends { scalar: true } ? OkLchScalar : OkLchAbsolute