yeeeeeeeeeeeee

wallpaper 2

May 3rd, 2025
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.03 KB | None | 0 0
  1. local args = {...}
  2. local pick = args[1]
  3.  
  4. if pick == nil then
  5. print("Options:")
  6. print("- default")
  7. print("- inverted")
  8. print("- rgb")
  9. print("- retro")
  10. print("- hacker")
  11. print("- random")
  12. return
  13. end
  14.  
  15. -- Start of presets
  16. local presets = {}
  17.  
  18. presets["default"] = {
  19. {colors.white, 0xf0f0f0},
  20. {colors.orange, 0xf2b233},
  21. {colors.magenta, 0xe57fd8},
  22. {colors.lightBlue, 0x99b2f2},
  23. {colors.yellow, 0xdede6c},
  24. {colors.lime, 0x7fcc19},
  25. {colors.pink, 0xf2b2cc},
  26. {colors.gray, 0x4c4c4c},
  27. {colors.lightGray, 0x999999},
  28. {colors.cyan, 0x4c99b2},
  29. {colors.purple, 0xb266e5},
  30. {colors.blue, 0x3366cc},
  31. {colors.brown, 0x7f664c},
  32. {colors.green, 0x57a64e},
  33. {colors.red, 0xcc4c4c},
  34. {colors.black, 0x111111}
  35. }
  36.  
  37. presets["inverted"] = {
  38. {colors.white, 0x111111},
  39. {colors.black, 0xf0f0f0},
  40. {colors.gray, 0x999999},
  41. {colors.lightGray, 0x4c4c4c},
  42. {colors.orange, 0xf2b233},
  43. {colors.magenta, 0xe57fd8},
  44. {colors.lightBlue, 0x99b2f2},
  45. {colors.yellow, 0xdede6c},
  46. {colors.lime, 0x7fcc19},
  47. {colors.pink, 0xf2b2cc},
  48. {colors.cyan, 0x4c99b2},
  49. {colors.purple, 0xb266e5},
  50. {colors.blue, 0x3366cc},
  51. {colors.brown, 0x7f664c},
  52. {colors.green, 0x57a64e},
  53. {colors.red, 0xcc4c4c}
  54. }
  55.  
  56. presets["rgb"] = {
  57. {colors.white, 0xffffff},
  58. {colors.orange, 0xff7f00},
  59. {colors.magenta, 0xbe00ff},
  60. {colors.lightBlue, 0x7f7fff},
  61. {colors.yellow, 0xffff00},
  62. {colors.lime, 0x00ff00},
  63. {colors.pink, 0xff00ff},
  64. {colors.gray, 0x555555},
  65. {colors.lightGray, 0xbebebe},
  66. {colors.cyan, 0x007fff},
  67. {colors.purple, 0x5500ff},
  68. {colors.blue, 0x0000ff},
  69. {colors.brown, 0x7f4000},
  70. {colors.green, 0x007f00},
  71. {colors.red, 0xff0000},
  72. {colors.black, 0x000000}
  73. }
  74.  
  75. presets["retro"] = {
  76. {colors.white, 0xf4f4f4},
  77. {colors.orange, 0xef7d57},
  78. {colors.magenta, 0x566c86},
  79. {colors.lightBlue, 0x41a6f6},
  80. {colors.yellow, 0xffcd75},
  81. {colors.lime, 0xa7f070},
  82. {colors.pink, 0x94b0c2},
  83. {colors.gray, 0x505050},
  84. {colors.lightGray, 0xb0b0b0},
  85. {colors.cyan, 0x3e82e0},
  86. {colors.purple, 0x333c57},
  87. {colors.blue, 0x3b5dc9},
  88. {colors.brown, 0x7f664c},
  89. {colors.green, 0x38b764},
  90. {colors.red, 0xb13e53},
  91. {colors.black, 0x151515}
  92. }
  93.  
  94. presets["hacker"] = {
  95. {colors.white, 0x00ff00},
  96. {colors.orange, 0x00ff00},
  97. {colors.magenta, 0x00ec05},
  98. {colors.lightBlue, 0x00da09},
  99. {colors.yellow, 0x00ff00},
  100. {colors.lime, 0x00c70e},
  101. {colors.pink, 0x00b513},
  102. {colors.gray, 0x006000},
  103. {colors.lightGray, 0x00b000},
  104. {colors.cyan, 0x00a217},
  105. {colors.purple, 0x00901c},
  106. {colors.blue, 0x003333},
  107. {colors.brown, 0x007d20},
  108. {colors.green, 0x006b25},
  109. {colors.red, 0x00582a},
  110. {colors.black, 0x001100}
  111. }
  112.  
  113. -- Generate random colors
  114. if pick == "random" then
  115. presets["random"] = {}
  116. local colorKeys = {
  117. colors.white, colors.orange, colors.magenta, colors.lightBlue,
  118. colors.yellow, colors.lime, colors.pink, colors.gray,
  119. colors.lightGray, colors.cyan, colors.purple, colors.blue,
  120. colors.brown, colors.green, colors.red, colors.black
  121. }
  122. for _, color in ipairs(colorKeys) do
  123. table.insert(presets["random"], {color, math.random(0, 0xFFFFFF)})
  124. end
  125. end
  126. -- End of presets
  127.  
  128. -- Delete old palette file
  129. if fs.exists("/startup/paletteSetter.lua") then
  130. fs.delete("/startup/paletteSetter.lua")
  131. end
  132.  
  133. -- Write new palette file
  134. local file = fs.open("/startup/paletteSetter.lua", "w")
  135. for i = 1, #presets[pick] do
  136. local color, hex = table.unpack(presets[pick][i])
  137. file.writeLine("term.setPaletteColor("..color..", "..hex..")")
  138. end
  139. file.close()
  140.  
  141. -- Run it
  142. shell.run("/startup/paletteSetter.lua")
  143. term.blit(" ", "ffffffffffffffff", "087fe145d39b62ac")
  144. print("")
  145.  
  146. -- Delete if default to restore original colors next reboot
  147. if pick == "default" then
  148. fs.delete("/startup/paletteSetter.lua")
  149. end
  150.  
Advertisement
Add Comment
Please, Sign In to add comment