Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter FiveGeneral Functions (continued)

GetGreenValue Function

Overview

The GetGreenValue function retrieves the green component from an RGB dword or a string value.

Syntax/Parameters

Syntax

byte = GetGreenValue ( dword data );

int  = GetGreenValue ( string data );

Parameters

data

A dword representing a 24-bit RGB value or

a string as RGB hex (#rrggbb, #rtb), RGB CSS ( rgb(rrr,ggg,bbb) ), or a web standard color name.

Return Value

Returns a byte representing the green color.

Remarks

The GetGreenValue function returns the 8 bits (byte) of a 24-bit color value that represents the green portion. The version of this function that accepts a dword as the input parameter does not return an error while the version that takes a string will return -1 on a syntax error or bad color name. If a byte is used to store the return value for the string version, -1 will be truncated to 0xFF with a runtime warning. Either way, use the IsError or GetLastError function to determine if an error occurred.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic