Add-On Documentation
  • Preparing search index...
  • The search index is not available
8Crafter's Server Utilities API
  • 8Crafter's Server Utilities API
  • Globals
  • modules
  • colorCore
  • getRelativeLuminance

Function getRelativeLuminance

  • getRelativeLuminance(color: Globals.modules.colorCore.Color): number

    Calculates the relative luminance of a color according to WCAG 2.0.

    Relative luminance represents the relative brightness of any point in a colorspace, normalized to 0 for darkest black and 1 for lightest white.

    Parameters

    • color: Globals.modules.colorCore.Color

      The color to analyze.

    Returns number

    A number between 0 (darkest black) and 1 (lightest white) representing the relative luminance.

    • Defined in ../../../../AppData/Roaming/.minecraft_bedrock/installations/Main Release/packageData/development_behavior_packs/DebugSticksAndScreens/node_modules/color-core/dist/accessability/components/relative-luminance.d.ts:11

Settings

Member Visibility
Add-On Documentation
8Crafter's Server Utilities API
  • Loading...

Generated using TypeDoc