Variable colorHelperConst

colorHelper: {
    calculateBrighterHexColor: ((hexColor, percentageBrighter, fallbackHexColor?) => string | undefined);
    getColorStatusFromString: ((status) => string);
    hexColorToRgb: ((hex, fallbackRgbColor?) => Rgb | undefined);
    stringToColour: ((str) => string);
} = ...

Type declaration

  • calculateBrighterHexColor: ((hexColor, percentageBrighter, fallbackHexColor?) => string | undefined)
      • (hexColor, percentageBrighter, fallbackHexColor?): string | undefined
      • Calculates a brighter hex color by the specified brighter percentage.

        Parameters

        • hexColor: string

          the input hex color #RRGGBB

        • percentageBrighter: number

          How much to brighten the color

        • Optional fallbackHexColor: string

          Optional fallback color if the hexColor argument is invalid

        Returns string | undefined

        The brightened color or undefined if invalid hexColor

        See

        Url

  • getColorStatusFromString: ((status) => string)
      • (status): string
      • If the status is 'unknown' or not passed, it will return with '--unknown' css color variable value. Otherwise it will generate a hexa color in string based on the passed status.

        Parameters

        • status: undefined | string

          The status which a color string will be generated

        Returns string

        Color string in hexa format

  • hexColorToRgb: ((hex, fallbackRgbColor?) => Rgb | undefined)
      • (hex, fallbackRgbColor?): Rgb | undefined
      • Returns the specified #hex color to RGB. RR (red), GG (green) and BB (blue) are hexadecimal integers between 00 and FF specifying the intensity of the color.

        Parameters

        • hex: string

          The hex color on the format #RRGGBB

        • Optional fallbackRgbColor: Rgb

          Optional fallback color if the hex argument is invalid

        Returns Rgb | undefined

        The color in RGB format. Returns the fallbackHexColor of invalid hex, which defaults to undefined

        See

        Url

  • stringToColour: ((str) => string)
      • (str): string
      • Parameters

        • str: string

          String value from which the color will be generated

        Returns string

        Color in hexa format, like: #FF1266

Generated using TypeDoc