@4bitlabs/inclusive-color-space
    Preparing search index...

    Function createHexPicker

    • Create a color picker that returns hex-string (#RRGGBB).

      Parameters

      • rSquared: number

        the radius of the sphere in the skin-tone color-space.

      • Optionaloptions: CreatePickerOptions
        • Optionalmapping?: "disc" | "square"

          "disc"

          The coordinate mapping to use for components.

          • "disc" remaps the [−100, +100] coordinate space to a disc using Shirley-Chiu Disk-and-Square Mapping.
          • "square" leaves the [−100, +100] coordinate space untouched. This will match closely match the reference implementation.

      Returns InclusiveColorPicker<string>

      import { createHexPicker } from '@4bitlabs/inclusive-color-space/advanced';

      // create a generator with a custom rSquared value
      const mySkinTones = createHexPicker(10.0);
      const skinColor = mySkinTones(+20.0, -15.5, -5.0);