Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upFour51.Actions.RgbColor
Overview
Constructs a Pageflex.Scripting.Color object and exposes the value for assignment to a defined color in the template file.
Syntax
return new RgbColor("CustomColor_RGB", "100-80-60").ToString();
Source Code
internal class RgbColor
{
private string _name;
private string _rgb;
private uint[] Rgb
{
get
{
string[] input = _rgb.ToString().Split(new string[] { "-" }, StringSplitOptions.None);
uint[] values = { Convert.ToUInt32(input[0]), Convert.ToUInt32(input[1]), Convert.ToUInt32(input[2]) };
return values;
}
}
public RgbColor(string Name, string Values)
{
_name = Name;
_rgb = Values;
//get defined color and apply rgb values
Color color = Application.CurrentDocument.GetColor(_name);
color.RgbValues = this.Rgb;
}
public override string ToString()
{
return _name;
}
}
Press h to open a hovercard with more details.