MakeGray

From WikiPrizm
Revision as of 20:34, 17 April 2014 by ProgrammerNerd (talk | contribs) (→‎Synopsis)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Synopsis

Creates a two-byte 5/6/5 color code based on a grey value.

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.