Advertisement
slipers

OpenOS. Colors Table.

Oct 30th, 2018
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local conv = require("conv")
  2. local component = require("component")
  3.  
  4. local rr={"00","33","66","99","CC","FF"}
  5. local gg={"00","24","49","6D","92","B6","DB","FF"}
  6. local bb={"00","40","80","C0","FF"}
  7. local bw={"0F","1E","2D","3C","4B","5A","69","78","87","96","A5","B4","C3","D2","E1","F0"}
  8.  
  9. local x,y=1,1
  10. local gpu = component.gpu
  11. local w,h = gpu.getResolution()
  12.  
  13. gpu.fill(1,1,w,h," ")
  14. for _,r in pairs(rr) do
  15.   for _,g in pairs(gg) do
  16.     for _,b in pairs(bb) do
  17.       local rgb=conv.getColor(conv.getThreeColor(r..g..b))
  18.       gpu.setForeground(conv.invertColor(rgb))
  19.       gpu.setBackground(rgb)
  20.       gpu.set(x,y,r..g..b)
  21.       x=x+7; if x>=w-6 then x=1;y=y+1 end
  22.     end
  23.   end
  24. end
  25. x=1;y=y+1
  26. for _,i in pairs(bw) do
  27.   local rgb=conv.getColor(conv.getThreeColor(i..i..i))
  28.   gpu.setForeground(conv.invertColor(rgb))
  29.   gpu.setBackground(rgb)
  30.   gpu.set(x,y,i..i..i)
  31.   x=x+7; if x>=w-6 then x=1;y=y+1 end
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement