stringToColor

Typehandler
Dictionarylibrary.widgetutils
LibraryWidget Utilities
Syntax
stringToColor(<pString>)
Associationscom.livecode.library.widgetutils
Summary

Converts a string to a color

Parameters
NameTypeDescription
pString

A comma delimited string representing a color in RGB / RGBA format

Example
property widgetColor 	get getColor	set setColor
metadata widgetColor.editor is "com.livecode.pi.colorwithalpha"

private variable mColor as Color

public handler OnLoad(in pProperties as Array)
	setColor(pProperties["color"])
end handler

public handler setColor(in pColor as String)
	put stringToColor(pColor) into mColor
	redraw all
end handler
Description

Use the stringToColor handler when receiving colors from LiveCode script via a property setter, or from the widget's stored properties array when loading.