diff --git a/core_namespace/utilities.lua b/core_namespace/utilities.lua index 10f617d..50f2935 100644 --- a/core_namespace/utilities.lua +++ b/core_namespace/utilities.lua @@ -365,5 +365,5 @@ function minetest.colorspec_to_bytes(colorspec) end --- Converts a ColorSpec into RGBA table form. If the ColorSpec is invalid, returns nil. You can use this to parse ColorStrings. --- @param colorspec ColorSpec The ColorSpec to convert. ---- @return {r:number, g:number, b:string, a:number}? +--- @return {r:number, g:number, b:number, a:number}? function minetest.colorspec_to_table(colorspec) end diff --git a/specs/Color.lua b/specs/Color.lua index 1bf6f26..4977370 100644 --- a/specs/Color.lua +++ b/specs/Color.lua @@ -6,7 +6,7 @@ --- * an RGB or RGBA hex color code, e.g. `"#RRGGBB"` or `"#RRGGBBAA"`, where `RR`, `GG`, `BB`, and `AA` are two-digit hexadecimal numbers representing the red, green, blue, and alpha (opacity) components of the color. --- * e.g. `"#FF0000"` for red, `"#00FF00"` for green, `"#0000FF"` for blue, etc. --- * a shorthand hex color code, e.g. `"#RGB"` or `"#RGBA"`, where `R`, `G`, `B`, and `A` are single-digit hexadecimal numbers representing the red, green, blue, and alpha (opacity) components of the color. ---- @class ColorString: string +--- @alias ColorString string @@ -17,4 +17,4 @@ --- `colorspec = 0xFF00FF00` --- * string form: A ColorString (defined above): --- `colorspec = "green"` ---- @class ColorSpec: {r:number, g:number, b:number, a:number}|ColorString|number +--- @alias ColorSpec {r:number, g:number, b:number, a:number}|ColorString|number