@tremendous/help
    Preparing search index...

    Function isDarkColor

    • Checks whether a given color is considered dark. A color is considered dark if its luminosity is less than 0.5.

      Parameters

      • Optionalcolor: string

        The CSS color string to be evaluated.

      Returns boolean

      Returns true if the color is dark, otherwise false. If no color is provided, returns false.

      const isDark = isDarkColor("#000000");
      console.log(isDark); // true