Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "wordpress-packages/customize/lib/utils/getLuminosity"

Index

Functions

Functions

getLuminosity

  • getLuminosity(colorString: string): number
  • Calculate luminosity of a given #RRGGBB string.

    Also ported to ContrastRatioValidator.php.

    see

    http://www.w3.org/TR/WCAG20/#relativeluminancedef

    Parameters

    • colorString: string

    Returns number

Generated using TypeDoc