Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions custom/Global.ColorAlpha.lua
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions custom/Global.ColorRand.lua
Original file line number Diff line number Diff line change
@@ -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
Loading