mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-09-10 14:25:59 +00:00
Improve documentation for colors.fromBlit and colors.toBlit
This commit is contained in:
@@ -357,6 +357,12 @@ end
|
|||||||
--
|
--
|
||||||
-- @tparam number color The color to convert.
|
-- @tparam number color The color to convert.
|
||||||
-- @treturn string The blit hex code of the color.
|
-- @treturn string The blit hex code of the color.
|
||||||
|
-- @usage
|
||||||
|
-- ```lua
|
||||||
|
-- colors.toBlit(colors.red)
|
||||||
|
-- -- => "c"
|
||||||
|
-- ```
|
||||||
|
-- @see colors.fromBlit
|
||||||
-- @since 1.94.0
|
-- @since 1.94.0
|
||||||
function toBlit(color)
|
function toBlit(color)
|
||||||
expect(1, color, "number")
|
expect(1, color, "number")
|
||||||
@@ -370,6 +376,13 @@ end
|
|||||||
--
|
--
|
||||||
-- @tparam string hex The paint/blit hex character to convert
|
-- @tparam string hex The paint/blit hex character to convert
|
||||||
-- @treturn number The color
|
-- @treturn number The color
|
||||||
|
-- @usage
|
||||||
|
-- ```lua
|
||||||
|
-- colors.fromBlit("e")
|
||||||
|
-- -- => 16384
|
||||||
|
-- ```
|
||||||
|
-- @see colors.toBlit
|
||||||
|
-- @since 1.105.0
|
||||||
|
|
||||||
function fromBlit(hex)
|
function fromBlit(hex)
|
||||||
expect(1, hex, "string")
|
expect(1, hex, "string")
|
||||||
|
Reference in New Issue
Block a user