You can't apply a RegExp option to a Chameleon plugin measure, because it doesn't support this option. RegExp belongs basically to WebParser measures, jsmorley as well applied this option onto a WebParser measure (in 2012, when he posted the linked reply, WebParser was a Plugin measure, in meantime it has been converted to an internal measure - but this matters less). What I understood from your description, is that you'd like to add 50 to each component of the color code. If this is correct and this is indeed what you1d like to achieve, unfortunately it's not quite simple, however can be done.
Unfortunately you'll need three measures for each color code you'd like to alter. Each of them will return one of the components of the color code. Then you need another three measures, to get the value which is increased by what you want to add. Finally after this step, you can use the values returned by these last measures, to create the altered color code.
Here is a quick example:
First this is the measure I'll work with:Note the commented out RegExp option.
Add the following three measures, which will return the three components of the color code returned by the measure:Finally the measures which are returning the values increased by 50 each, will be the following ones:When you have these measure, the altered color code can be used as [AverageLightRed+50],[AverageLightGreen+50],[AverageLightBlue+50].
Sorry if I misunderstood your need. Please let me know if I did or got the idea.
Unfortunately you'll need three measures for each color code you'd like to alter. Each of them will return one of the components of the color code. Then you need another three measures, to get the value which is increased by what you want to add. Finally after this step, you can use the values returned by these last measures, to create the altered color code.
Here is a quick example:
First this is the measure I'll work with:
Code:
[AverageLight]Measure=PluginPlugin=ChameleonParent=ChameleonDesktopFormat=DecColor=Average;RegExp="(?siU)\[Variables\]\r\nColor1=(.+50*),(.+50*),(.+50*)OnChangeAction=[!UpdateMeasureGroup Luminance]
Add the following three measures, which will return the three components of the color code returned by the measure:
Code:
[AverageLightRed]Measure=StringString=[AverageLight]RegExpSubstitute=1Substitute="(\d{1,3}),(\d{1,3}),(\d{1,3})":"\1"DynamicVariables=1[AverageLightGreen]Measure=StringString=[AverageLight]RegExpSubstitute=1Substitute="(\d{1,3}),(\d{1,3}),(\d{1,3})":"\2"DynamicVariables=1[AverageLightBlue]Measure=StringString=[AverageLight]RegExpSubstitute=1Substitute="(\d{1,3}),(\d{1,3}),(\d{1,3})":"\3"DynamicVariables=1
Code:
[AverageLightRed+50]Measure=CalcFormula=( [AverageLightRed] + 50 )DynamicVariables=1[AverageLightGreen+50]Measure=CalcFormula=( [AverageLightGreen] + 50 )DynamicVariables=1[AverageLightBlue+50]Measure=CalcFormula=( [AverageLightBlue] + 50 )DynamicVariables=1
Sorry if I misunderstood your need. Please let me know if I did or got the idea.
Statistics: Posted by balala — Yesterday, 8:08 pm