@OPEN-KAPPA/COLORS
    Preparing search index...

    Class LightAbstract

    Class for color light manipulation.

    Index

    Methods

    • Balance the light shifting it towards the middle gray.

      Type Parameters

      Parameters

      • color: C

        The color to balance.

      • ratio: number

        The shifting ratio between 0-1.

      • OptionaltargetGray: number

        Optional target gray. Default is the middle gray.

      Returns C

      The mapped color.

      If the color space has no lightness, which is impossible if typeing is respected.

    • Shift the light towards the black.

      Type Parameters

      Parameters

      • color: C

        The color to balance.

      • ratio: number

        The shifting ratio between 0-1.

      Returns C

      The mapped color.

      If the color space has no lightness, which is impossible if typeing is respected.

    • Shift the light towards the white.

      Type Parameters

      Parameters

      • color: C

        The color to balance.

      • ratio: number

        The shifting ratio between 0-1.

      Returns C

      The mapped color.

      If the color space has no lightness, which is impossible if typeing is respected.