new LayerColorAdjustmentOptions()
The LayerColorAdjustmentOptions type holds all options a LayerColorAdjustment object which adjusts the layer's brightness or contrast. The LayerColorAdjustment.Options property sets or gets multiple options of a LayerColorAdjustment object at once, through an object of LayerColorAdjustmentOptions type.
Every option of the LayerColorAdjustmentOptions type has associated a property of the LayerColorAdjustment object. For instance, the option:
red {(number|string)}, defines the percent value or the format-expression of the red-channel adjustment to display the layeris associated with the property:
Red {(number|string)}, defines the percent value or the format-expression of the red-channel adjustment to display the layerwhich means that the following statements are equivalent:
oColor.Options = {red: "value/2"}where oColor is an object of LayerColorAdjustment type
oColor.SetOptions({red: "value/2"})
oColor.Red = "value/2"
oColor.SetRed("value/2")
- Since:
- 5.4
Members
(static) blue :number|string
The blue field defines the percent value or the format-expression of the blue-channel adjustment to display the layer, which corresponds to the [contrast.blue] or [brightness.blue] flag used in layers field. The red and green fields define the same for the red and green channels respectively. For instance, if you set the blue field to "value/2", when the layer's value is 100, it is displayed with 50% of its blue color, and when the layer's value is 0, it is displayed with 0% of its blue color. If you set it to "100 - value/2", it is displayed with more blue color as its value increases. If you set it to a constant number like 30, it is displayed with 30% of its blue color regardless of its value.
The expression supports the following keywords:
"value", indicates the Layer.Value property of the layer, which is the value displayed by the layer and can be linked to the layer's rotation angle or offset though the rotateAngleToValue, offsetToValue fields, so when the layer is rotated or moved, its value changes accordingly.
The blue field is mapped to the Blue property, which means that the following statements are equivalent:
oColor.Options = {blue: "value/2"}
oColor.SetOptions({blue: "value/2"})
oColor.Blue = "value/2"
oColor.SetBlue("value/2")
Type:
- number | string
Example
50 {number}, the layer is displayed with 50% of its blue color regardless of its value
"value/2" {string}, the layer is displayed with the blue color that is half of its value
"100 - value" {string}, the layer is displayed with more blue color as its value increases
blue
(static) green :number|string
The green field defines the percent value or the format-expression of the green-channel adjustment to display the layer, which corresponds to the [contrast.green] or [brightness.green] flag used in layers field. The red and blue fields define the same for the red and blue channels respectively. For instance, if you set the green field to "value/2", when the layer's value is 100, it is displayed with 50% of its green color, and when the layer's value is 0, it is displayed with 0% of its green color. If you set it to "100 - value/2", it is displayed with more green color as its value increases. If you set it to a constant number like 30, it is displayed with 30% of its green color regardless of its value.
The expression supports the following keywords:
"value", indicates the Layer.Value property of the layer, which is the value displayed by the layer and can be linked to the layer's rotation angle or offset though the rotateAngleToValue, offsetToValue fields, so when the layer is rotated or moved, its value changes accordingly.
The green field is mapped to the Green property, which means that the following statements are equivalent:
oColor.Options = {green: "value/2"}
oColor.SetOptions({green: "value/2"})
oColor.Green = "value/2"
oColor.SetGreen("value/2")
Type:
- number | string
Example
50 {number}, the layer is displayed with 50% of its green color regardless of its value
"value/2" {string}, the layer is displayed with the green color that is half of its value
"100 - value" {string}, the layer is displayed with more green color as its value increases
green
(static) red :number|string
The red field defines the percent value or the format-expression of the red-channel adjustment to display the layer, which corresponds to the [contrast.red] or [brightness.red] flag used in layers field. The green and blue fields define the same for the green and blue channels respectively. For instance, if you set the red field to "value/2", when the layer's value is 100, it is displayed with 50% of its red color, and when the layer's value is 0, it is displayed with 0% of its red color. If you set it to "100 - value/2", it is displayed with more red color as its value increases. If you set it to a constant number like 30, it is displayed with 30% of its red color regardless of its value.
The expression supports the following keywords:
"value", indicates the Layer.Value property of the layer, which is the value displayed by the layer and can be linked to the layer's rotation angle or offset though the rotateAngleToValue, offsetToValue fields, so when the layer is rotated or moved, its value changes accordingly.
The red field is mapped to the Red property, which means that the following statements are equivalent:
oColor.Options = {red: "value/2"}
oColor.SetOptions({red: "value/2"})
oColor.Red = "value/2"
oColor.SetRed("value/2")
Type:
- number | string
Example
50 {number}, the layer is displayed with 50% of its red color regardless of its value
"value/2" {string}, the layer is displayed with the red color that is half of its value
"100 - value" {string}, the layer is displayed with more red color as its value increases
red