@skchr/color
    Preparing search index...

    Function family

    • Returns the hue family which the passed in color belongs to with the "overtone" included (if it has one.).

      For example 'red' or 'blue-green'. If the color is achromatic it returns the string 'gray'.

      Parameters

      • color: ColorToken

        The color to query its shade or hue family.

      • bias: boolean = false

        Returns the name of the hue family which is biasing the passed in color using the 'lch' colorspace. If it has no bias it returns false on the bias property of the returned object.

      Returns { bias: false | ColorFamily; hue: never }

      The hue family name, or an object with the family and its bias.

      import { family } from '@skchr/color'


      console.log(family("#310000"))

      // 'red'