// Get the current front image
image GlobalSino := GetFrontImage()

// Create three line annotations
GlobalSino.CreateLineAnnotation(0, 0, 50, 200)       // Line 1
GlobalSino.CreateLineAnnotation(100, 50, 200, 250)   // Line 2
GlobalSino.CreateLineAnnotation(200, 0, 250, 200)    // Line 3

// Get the image display
imagedisplay disp
disp = GlobalSino.ImageGetImageDisplay(0)

// Get the total number of line annotations
number nLines = disp.ComponentCountChildrenOfType(2)

// Get the last three line components (just added)
component line1 = disp.ComponentGetNthChildOfType(2, nLines - 3)
component line2 = disp.ComponentGetNthChildOfType(2, nLines - 2)
component line3 = disp.ComponentGetNthChildOfType(2, nLines - 1)

// Set their colors
line1.ComponentSetForegroundColor(1.0, 0.0, 0.0)  // Red
line2.ComponentSetForegroundColor(0.0, 1.0, 0.0)  // Green
line3.ComponentSetForegroundColor(0.0, 0.0, 1.0)  // Blue