setColor.lua 1.0 KB

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