So I've been starting DS programming, and I notice that to draw a pixel the color must be a RGB(0, 31, 0). Is there any way to change that to something like RGB(0, 255, 0)?
5 Bit RGB (0, 31, 0) to 16 Bit RGB (0, 255, 0)
5k Views Asked by NDSgrammer At
2
There are 2 best solutions below
5

If you have a green-value g
with a range of 0-255, you can convert it to NintendoDS's 0-31 range by using g*31/255
. If you are asking us if you can actually do something to make your NintendoDS display a range of 0-255 for each channel the answer is no, but you could use dithering (search-engine it).
5 bit rgb : 31 = 8 bit rgb : 255
so
8 bit rgb = (5 bit rgb * 255 / 31)
Example:
PS: I think you mean "5 bit RGB to 8 bit RGB" in your title.