setBackgroundColor.lua 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. return {
  2. tag = 'graphicsState',
  3. summary = 'Set the background color.',
  4. description = [[
  5. Sets the background color used to clear the screen. Color components are from 0.0 to 1.0.
  6. ]],
  7. arguments = {
  8. r = {
  9. type = 'number',
  10. description = 'The red component of the background color.'
  11. },
  12. g = {
  13. type = 'number',
  14. description = 'The green component of the background color.'
  15. },
  16. b = {
  17. type = 'number',
  18. description = 'The blue component of the background color.'
  19. },
  20. a = {
  21. type = 'number',
  22. default = '1.0',
  23. description = 'The alpha component of the background color.'
  24. },
  25. hex = {
  26. type = 'number',
  27. description = 'A hexcode like `0xffffff` to use for the background (does not support alpha).'
  28. },
  29. color = {
  30. type = 'table',
  31. description = 'A table containing 3 or 4 color components.'
  32. }
  33. },
  34. returns = {},
  35. variants = {
  36. {
  37. arguments = { 'r', 'g', 'b', 'a' },
  38. returns = {}
  39. },
  40. {
  41. arguments = { 'hex' },
  42. returns = {}
  43. },
  44. {
  45. arguments = { 'color' },
  46. returns = {}
  47. }
  48. },
  49. notes = 'The default background color is `(0.0, 0.0, 0.0, 1.0)`.'
  50. }