Procedure UserColorModify(color\_name, red, green, blue)

UserColorModify

With the procedure UserColorModify you can programmatically modify an existing color in the set of user colors.

UserColorModify(
     color_name,           ! (input) scalar string expression
     red,                 ! (input) scalar numerical expression
     green,               ! (input) scalar numerical expression
     blue                 ! (input) scalar numerical expression
     )

Arguments

color_name

A string expression holding the name of the user color to modify.

red

An integer value in the range \(0\dots 255\) indicating the red component in the RGB value of the color.

green

An integer value in the range \(0\dots 255\) indicating the green component in the RGB value of the color.

blue

An integer value in the range \(0\dots 255\) indicating the blue component in the RGB value of the color.

Return Value

The procedure returns 1 if the color could be modified successfully, and 0 if the color does not exist, or is contained in the fixed set of project colors.

Note

You can only modify user colors that have been added using the procedure UserColorAdd. Colors added through the Tools-User Colors dialog box are fixed and cannot be deleted or modified.

See also

UserColorAdd, UserColorDelete, UserColorGetRGB. User colors are discussed in full detail in Setting colors within the model.