Flourescent Orange on 3.5" LCD TFT

here are the specs for the LCD i am using. things work fine, but i can't seem to get it to show a flourescent orange.

Supports development boards such as for Arduino UNO and Mega2560 for plug-in use without wiring
480X320 resolution, clear display, support for Contact function
Support 16-bit RGB 65K color display, display rich colors
8-bit parallel bus, faster than serial SPI refresh
On-board 5V/3.3V level shifting IC, compatible with 5V/3.3V operating voltage
Easy to expand the experiment with SD card slot
Provides an for Arduino library with a rich sample program
Military-grade process standards, long-term stable work
Provide underlying driver technical support
SKU: MAR3501(have Contact screen)
Screen Size: 3.5(inch)
Type: TFT
Driver IC : ILI9486
Active Area: 73.4448.96(mm)
Module PCB Size : 85.49
Operating Temperature: -20℃-70℃
Storage Temperature: -40℃-70℃
Operating Voltage : 5V/3.3V
Power Consumption: TBD
Product Weight(Package containing) : 44g(have Contact screen)
Material:Metal +pc
Package Contents:
1 * 3.5 inch TFT LCD color display module

in my sketch i define colors thusly :

#define BLACK 0x0000 // U16 definition
#define RED 0xF800
#define GREEN 0x07E0
#define DARKGREEN 0x0408
#define WHITE 0xFFFF
#define GREY 0x8410
#define YELLOW 0xFFE0
#define BLUE 0x001F
#define ORANGE 0xFBE0
#define LIGHTCYAN 0x87FF
#define PINK 0xF81F

i think this is called U16 definition, but i'm not sure. I have been unable to find in google any flr orange that is described like these. various sites show flr orange in what i guess is hex, but i can't seem to get the LCD / sketch to accept it.

is there flr orange in U16 ? or how can i convert a hex definition to U16, or talk my arduino sketch into using hex ?

It appears your display (like many others) uses a color space that is sometimes called RBG 565 - 5 bits for red, 6 bits for green, 5 bits for blue.

If you have an RGB value that uses 8 bits per color (the 'normal' RGB, or RGB 888), then you can convert RGB 888 to RGB 565 as follows:

uint16_t RGB_888_to_565(uint8_t R, uint8_t G, uint8_t B)
	return ((uint16_t)(R & 0xF8) << 8) | ((uint16_t)(G & 0xFC) << 3) | ((uint16_t)(B & 0xF8) >> 3);

This assumes you have separate values for R, G, and B, each 8 bits (2 hex digits). Each fits in one byte.

If the value you have is a 6 digit hex number (for example, RED would be 0xFF0000), then the first two digits are the RED component, the next GREEN, the final 2 BLUE.

Finally, the post below has all 140 HTML color names encoded as RGB 565.


I read the reply, and the link, and added the HtmlColors.h library. but i'm as lost as before. i think i get what you are saying about 565 & 888, but i don't see how either is used in calling for a color.

if 565 is in the form 0xF800, what is 0xFF0000 ? and i can't figure out how to utilize the converter.
where does it go in the sketch ? what is the input & output ?

maybe you would be so kind as to give me an example of how to use the color HotPink ?

ok. got it figure out.

You can #define any color, using an RGB565 color picker

An easy and good color picker is available at 16 bit color generator (RGB565 color picker) | Electrical engineering and programming notepad

A nice fluorescent orange for instance is 0xF480.

Good luck

photoncatcher -

thanks for the help that i could understand. i did try that color code, but on my display it was darker and dirtier than normal flr orange.

however, i did find 0x3FE2, which is an almost flourescent green, and it works well for my purpose.

I like that particular color picker because you can move your cursor around, select some suitable color, implement it in a test sketch, appreciate the result on the TFT display, and pick another color if you are not satisfied. And so on until that perfect color is found matching your imagination.

By the way: the correct spelling is 'fluorescent', from 'fluorescence' ( see Fluorescence - Wikipedia). 'Flourescence' reminds me of 'flour'. Ever bought bread that glows in the dark?