diff --git a/custom/Global.ColorAlpha.lua b/custom/Global.ColorAlpha.lua new file mode 100644 index 0000000..42b68ea --- /dev/null +++ b/custom/Global.ColorAlpha.lua @@ -0,0 +1,8 @@ +---Returns a new [Color](https://wiki.facepunch.com/gmod/Color) with the RGB components of the given [Color](https://wiki.facepunch.com/gmod/Color) and the alpha value specified. +---@realm shared +---@realm menu +---@source https://wiki.facepunch.com/gmod/Global.ColorAlpha +---@param color Color The Color from which to take RGB values. This color will not be modified. +---@param alpha number The new alpha value, a number between 0 and 255. Values above 255 will be clamped. +---@return Color # The new Color with the modified alpha value +function _G.ColorAlpha(color, alpha) end diff --git a/custom/Global.ColorRand.lua b/custom/Global.ColorRand.lua new file mode 100644 index 0000000..fe9534d --- /dev/null +++ b/custom/Global.ColorRand.lua @@ -0,0 +1,7 @@ +---Creates a [Color](https://wiki.facepunch.com/gmod/Color) with randomized red, green, and blue components. If the alpha argument is true, alpha will also be randomized. +---@realm shared +---@realm menu +---@source https://wiki.facepunch.com/gmod/Global.ColorRand +---@param a? boolean Should alpha be randomized. +---@return Color # The created Color. +function _G.ColorRand(a) end