flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
newport 07 Apr 2016, 19:03
ok.. as always, i seem to find my answers after posting... lol - this link helped me understand how to convert rgb colors to 5:6:5 colors -
http://www.avrfreaks.net/forum/color-map-ili93401-tft-display ..and excerpt from the page states.. Code: Pick some colours, for example I like the look of #66FF99 and then convert this 24 bit 8:8:8 value to 5:6:5 or 6:6:6 using the most significant bits. So for this lovely greeney-blue the 66FF99 is: R: 0x66 = 0b01100110 G: 0xFF = 0b11111111 B: 0x99 = 0b10011001 To convert to 18 bit (6:6:6) just take the top 6 bits of each: R: 011001 G: 111111 B: 100110 then add them together to make the 18bits 011001 111111 100110 grouping that in fours: 01 1001 1111 1110 0110 which in hex is: 0x19FE6 Doing the same for 16 bit (5:6:5) would be: R: 01100 G: 111111 B: 10011 which is 0110 0111 1111 0011 0x67F3 So "limey green" is 0x19FE6 in 18 bit mode and 0x67F3 in 16 bit mode. |
|||
![]() |
|
cod3b453 07 Apr 2016, 20:59
The VBE3 standard (http://www.petesqbsite.com/sections/tutorials/tuts/vbe3.pdf) defines the layouts for preset modes but also provides generic RGB field info in the get mode info function (#1), which could help - though to be honest I went straight to 24/32 bit modes for the simplicity
![]() |
|||
![]() |
|
newport 08 Apr 2016, 14:51
i wanted to use 24or 32 bit, but the only vesa modes that would work with my computer are .. 101h, 111h, 114h, and 117h...
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.