Calculator Community > Lua
Greyscale on Nspire/CAS
Chirlian:
Hi Jens,
I will try this on my Clickpad to see, if I get a linear greyscale by this formula. In practice I did simply set the rgb channels synchron to 0/16/32/64 and so on to get the 16 greyshades that the clickpad can show. I will look, if that is as linear as using your formular.
greeting
klaus
Jens_K:
Well I think you got me wrong here; the best way to get certain shades of gray is to set R,G and B to the same value. The formula would just explain how the Nspire transforms colors to gray shades. E.g. if you'd gc:setColorRGB(150,100,255), then, according to the formula,
--- Code: ---floor((0.299*150+0.587*100+0.114*255)/16)=8
--- End code ---
the Nspire would display the 8th shade.
Navigation
[0] Message Index
[*] Previous page
Go to full version