grafX2/scripts/pic_ni_Colorspace12bit.lua
Yves Rizoud 8c2655f88a Lua: finished inputbox with negative and decimal inputs. Added to the repository more than 20(!) new scripts by DawnBringer
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1357 416bcca6-2ee7-4201-b75f-2eb2f807beb1
2010-02-21 17:58:20 +00:00

11 lines
261 B
Lua

-- 12bit colour space from palette
--
w,h=getpicturesize();
for y1=0,3,1 do
for x1=0,3,1 do
for y2=0,15,1 do
for x2=0,15,1 do
putpicturepixel(x1*16+x2,y1*16+y2,matchcolor((y2*255)/15,
((y1*4+x1)*255)/15,(x2*255)/15))
end;end;end;end