# Color Vision Data Access functions

Note: For each of the following functions, the first parameter references a cell containing a color data structure. The structure is named according to the color tool that created it: for example, TrainMatchColor creates a MatchColorLib data structure, while MatchColor creates a Colors data structure. Use the GetColorLibraryName function Functions are tools that are available in Spreadsheet for processing and analyzing acquisitions or other results. You can add functions to your Spreadsheet job to create tool chains and produce results for specific applications. to determine which tool created a specific color data structure.

Function | Description
GetActiveMatchClrColorName(Colors, Index) | Returns the name of the indexed active Color for a MatchColor function.
GetBlue(Colors) | Returns the blue component of the average Color in the region of interest (ROI) for a MatchColor function.
GetColorLibraryName(Color Structure) | Works with both the TrainMatchColor and MatchColor functions. For the TrainMatchColor function, it returns the name of the Color Library stored by the function. For the MatchColor function, it returns the name of the referenced TrainMatchColor function.
GetConfidenceScore(Colors) | Returns the confidence score of the current inspection for a MatchColor function. The confidence score is calculated as shown below: (s1 * (M - s2) - s2 * (M - s1)) / ( (M - s2) + (M - s1)) In this equation, s1 is the best score, s2 is the second best score, while M is a constant equal to 1.01. The higher the confidence score, the more likely it is that the best match was selected.
GetGreen(Colors) | Returns the Green component of the average color in the ROI for a MatchColor function.
GetHue(Colors) | Returns the Hue component of the average color in the ROI for a MatchColor function.
GetIntensity(Colors) | Returns the Intensity component of the average color in the ROI for a MatchColor function.
GetMatchClrColorByRank(Colors, Rank) | Returns the index of the Color that matches the rank (0 to n-1) for a MatchColor function. The Color with a rank of 0 has the highest score.
GetMatchClrColorState(Colors, ColorName) | Returns the state of the specified Color for a MatchColor function.
GetMatchClrDistByIndex(Colors, Index) | Returns the color distance of the indexed Color for a MatchColor function.
GetMatchClrDistByName(Colors, Name) | Returns the color distance of the named Color for a MatchColor function.
GetMatchClrScoreByIndex(Colors, Index) | Returns the score of the indexed Color for a MatchColor function.
GetMatchClrScoreByName(Colors, Name) | Returns the score of the named Color for a MatchColor function.
GetNActiveMatchClrColors(MatchColorLib) | Returns the number of referenced Colors that are active in the referenced MatchColor function.
GetNTrainMatchClrColors(MatchColorLib) | Returns the number of colors stored by the TrainMatchColor function.
GetRed(Colors) | Returns the Red component of the average color in the ROI for a MatchColor function.
GetSaturation(Colors) | Returns the Saturation component of the average color in the ROI for a MatchColor function.
GetTrainMatchClrColorName(MatchColorLib, Index) | Returns the name of the indexed stored Color for a MatchColor function.
SetMatchClrColorState(Colors, Enable, ColorName1, [ColorName2,...]) | Returns the number of Color(s) enabled or disabled for a MatchColor function. This function’s cell state is disabled when first inserted into the spreadsheet; it must be conditionally enabled by a Button function.