# Module `Nova.Tool`

The `Nova.Tool` module contains functions for defining tool plugins.

Tool.reference(type...)
  Argument:

    - type… (`string+`)

  Return type:

    `ResultReference`

  Creates the type that specifies one or more other result types for a reference parameter.

  Parameters that use this as its type can be configured to refer to the result of a tool. A tool with a reference parameter will execute after the tool with the referenced result, ensuring the result is available.

  The function takes one or more result type names as arguments.

  See `ResultReference` for use.

Tool.register(args)
  Argument:

    - args (`ToolRegistrationArguments`)

  Return type:

    `ToolClass`

  Register a new tool and make it available in Nova.

  The argument `args` is a Lua-table that specifies options like the tool name, the parameters for the tool and its results. See `ToolRegistrationArguments` for its format.

  Extension methods like `execute` should be added to the returned `ToolClass` to define the behavior of the tool.

interface Nova.Tool.color

  Functions that return RGB or RGBA color values for use with decorations in the `View`-crown.

  Example use:

      local td = View.TextDecoration.create()
      td:setColor(Tool.color.green())

  Nova.Tool.color.blue()
    Return type:

      `int`, `int`, `int`

  Nova.Tool.color.blueTranslucent()
    Return type:

      `int`, `int`, `int`, `int`

  Nova.Tool.color.blueTranslucent192()
    Return type:

      `int`, `int`, `int`, `int`

  Nova.Tool.color.green()
    Return type:

      `int`, `int`, `int`

  Nova.Tool.color.greenTranslucent()
    Return type:

      `int`, `int`, `int`, `int`

  Nova.Tool.color.greenTranslucent192()
    Return type:

      `int`, `int`, `int`, `int`

  Nova.Tool.color.red()
    Return type:

      `int`, `int`, `int`

  Nova.Tool.color.yellow()
    Return type:

      `int`, `int`, `int`

  Nova.Tool.color.yellowTranslucent()
    Return type:

      `int`, `int`, `int`, `int`

interface Nova.Tool.lineWidth

  Functions that return line widths for use with `View.ShapeDecoration`

  Nova.Tool.lineWidth.medium()
    Return type:

      `int`

  Nova.Tool.lineWidth.thick()
    Return type:

      `int`

  Nova.Tool.lineWidth.thin()
    Return type:

      `int`

interface Nova.Tool.pointSize

  Functions that return point sizes for use with `View.ShapeDecoration`

  Nova.Tool.pointSize.large()
    Return type:

      `int`

  Nova.Tool.pointSize.medium()
    Return type:

      `int`

  Nova.Tool.pointSize.small()
    Return type:

      `int`