TorqueScript Reference

- Main Page
- Related Pages
- Modules
- Classes

Functions
Color
Function Categories

## Functions
Integer | getStockColorCount ()
String | getStockColorF (stockColorName)
String | getStockColorI (stockColorName)
String | getStockColorName (stockColorIndex)
Boolean | isStockColor (stockColorName)

## Detailed Description

## Function Documentation

Integer getStockColorCount | ( |  | ) |

Gets a count of available stock colors.

Returns
  A count of available stock colors.

String getStockColorF | ( | stockColorName |  | ) |

Gets a floating-point-based stock color by name.

Parameters

  stockColorName | - The stock color name to retrieve.

Returns
  The stock color that matches the specified color name. Returns nothing if the color name is not found.

String getStockColorI | ( | stockColorName |  | ) |

Gets a byte-based stock color by name.

Parameters

  stockColorName | - The stock color name to retrieve.

Returns
  The stock color that matches the specified color name. Returns nothing if the color name is not found.

String getStockColorName | ( | stockColorIndex |  | ) |

Gets the stock color name at the specified index.

Parameters

  stockColorIndex | The zero-based index of the stock color name to retrieve.

Returns
  The stock color name at the specified index or nothing if the string is invalid.

Boolean isStockColor | ( | stockColorName |  | ) |

Gets whether the specified name is a stock color or not.

Parameters

  stockColorName | - The stock color name to test for.

Returns
  Whether the specified name is a stock color or not.