Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 09:14 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : HEX Values for Colours & TFT Colour

Author Message
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1097
Posted: 01:25am 06 Feb 2021
Copy link to clipboard 
Print this post

Playing around with colours on the CMM2 & Jim's TFT Colour Prog.

Type for example
? hex$(RGB(BLUE))
I get
F0000FF


Entering the hex number into TFT Colour, I get the correct colour  

Typing
? hex$(RGB(CYAN))
I get
F00FFFF


Entering this into TFT Colour, I get black. I noticed that the Green had gone up to 256.
Bringing this back to 255 gave the correct colour but dropped the first F from the HEX number.

I then RTFM (p27) & realised that the colours were only 6 HEX numbers.
TFF Colour worked OK with CYAN when the first F was dropped.

So I was just wondering why 7 HEX digits are listed as per above.

The initial F seems to be ignored by the CMM2 when used to change colour & mostly with TFT Colour but occasionally it has problems eg with CYAN.

Just wondering. Maybe missing something or doing something stupid.

BTW, just noticed the drop down list of colours in Jim's prog...... Good stuff.
Don't know why I missed it.

Brian
ChopperP
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 1132
Posted: 02:38am 06 Feb 2021
Copy link to clipboard 
Print this post

The extra hex digit is related to transparency.
But a better explanation would be helpful ...
Visit Vegipete's *Mite Library for cool programs.
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1097
Posted: 02:59am 06 Feb 2021
Copy link to clipboard 
Print this post

Ok, thanks
ChopperP
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 04:22am 06 Feb 2021
Copy link to clipboard 
Print this post

It is also a bug in TFTcolour
It shouldn't make green 256 no matter what you enter.

Jim
VK7JH
MMedit
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 05:01am 06 Feb 2021
Copy link to clipboard 
Print this post

Bug should be fixed.

TFTcolour.zip

Jim
VK7JH
MMedit
 
Chopperp

Guru

Joined: 03/01/2018
Location: Australia
Posts: 1097
Posted: 07:16am 06 Feb 2021
Copy link to clipboard 
Print this post

Thanks Jim.

That was quick.

Brian
ChopperP
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025