MakeGray

From WikiPrizm
Revision as of 20:34, 17 April 2014 by ProgrammerNerd (talk | contribs) (Created page with "== Synopsis == creates a two-byte 5/6/5 color code == Source code == <nowiki>int makeGray(int shade) { return shade * 0x0841; }</nowiki> == Inputs == shade which can be b...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Synopsis

creates a two-byte 5/6/5 color code

Source code

int makeGray(int shade) {
   return shade * 0x0841;
}

Inputs

shade which can be between 0 (black) and 31 (white).

Comments

Function originally written by calc84maniac.