2.2" 18-bit color TFT LCD

EL Wire/Tape/Panels, LEDs, pixels and strips, LCDs and TFTs, etc products from Adafruit

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
normlane
 
Posts: 128
Joined: Thu Apr 01, 2010 5:39 pm

2.2" 18-bit color TFT LCD

Post by normlane »

I'm finding 18 bit color a little confusing. Is there a utility somewhere to help find values for various colors?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: 2.2" 18-bit color TFT LCD

Post by adafruit_support_rick »

Just did some googling. There are nice 24-bit color calculators out there, but I found nothing for 18-bit color.

What is it you're having trouble with?

User avatar
normlane
 
Posts: 128
Joined: Thu Apr 01, 2010 5:39 pm

Re: 2.2" 18-bit color TFT LCD

Post by normlane »

Well, this display uses 6 bit colors rather than the usual 8 bits. Now values for rgb should add up to 18 bits, right? Except that the colors in the examples add up to 16 bits, two bytes. So what's the algorithm to convert back & forth?

:?:

User avatar
normlane
 
Posts: 128
Joined: Thu Apr 01, 2010 5:39 pm

Re: 2.2" 18-bit color TFT LCD

Post by normlane »

I realize that data is discarded and I end up with 65,535 possible colors instead of 16,777,215. Or is this display actually 5 bit color? in which case White wouldn't be 0xffff.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: 2.2" 18-bit color TFT LCD

Post by adafruit_support_rick »

16-bit color is 5-6-5: 5 bits of R, 6 bits of G, and 5 bits of B. If I'm not mistaken, the driver left-shifts the R and B to make 6 bits when you give it 16-bit data. It really is an 18-bit display.

User avatar
normlane
 
Posts: 128
Joined: Thu Apr 01, 2010 5:39 pm

Re: 2.2" 18-bit color TFT LCD

Post by normlane »

Ok thanks. I think I can do something with that info. You saved me a lot of hassle. My guesses on how this worked were a tad off the mark.

Locked
Please be positive and constructive with your questions and comments.

Return to “Glowy things (LCD, LED, TFT, EL) purchased at Adafruit”