Skip to main content
Version: 9.0.2

gre.to_alpha

gre.to_alpha(
percent
)

Generate a numeric alpha value in the range of 0 - 255 based on a percentage from 0 - 100.

Parameters

ParameterTypeDescription
percent#numberThe percent of transparency (0 = transparent, 100 = opaque).
-- Create a 50% transparent value
local alpha = gre.to_alpha(50)
gre.set_value("myLayer.myControl.alpha", alpha)