Ngx Console Life Hooks

Custom Colors

You can specify custom colors for the logs associated with a component, to do so you need to provide the customColors option and its value needs to be an object comprised of the following four optional fields:

  • component(colors for the component's name)
  • arrow(colors for the arrow)
  • hook(colors for the lifecycle hook's name)
  • extra(colors for the eventual extra information)

If a field is not specified the default devtools colors will be used for it section.

Each of these fields needs to reprent an object with two optional fields:

  • color(color for the text)
  • bgColor(color for the background)

The color and bgColor values need to be strings representing a valid css color ( like: rbg, rgba, hex or named colors ), if omitted the default devtools colors will we used.

Examples

{
  component: {
    color: 'red',
    bgColor: 'pink'
  },
  arrow: {
    bgColor: 'lightblue'
  },
  hook: {
    color: 'navy',
    bgColor: 'pink'
  },
  extra: {
    color: 'green'
  }
}
ComponentName ======> HookName (extra)
{
  component: {
    color: '#dcf2ff',
    bgColor: '#263f97'
  },
  arrow: {
    color: '#dcf2ff69',
    bgColor: '#263f97'
  },
  hook: {
    color: '#dcf2ff',
    bgColor: '#263f97'
  },
  extra: {
    color: '#dcf2ff69',
    bgColor: '#263f97'
  }
}
ComponentName ======> HookName (extra)
{
  component: {
    color: 'green',
    bgColor: 'rgb(250 255 208)'
  },
  hook: {
    color: 'green',
    bgColor: 'rgb(250 255 208)'
  }
}
ComponentName ======> HookName (extra)