![]() |
Forum Index : Microcontroller and PC projects : HEX Values for Colours & TFT Colour
Author | Message | ||||
Chopperp![]() Guru ![]() Joined: 03/01/2018 Location: AustraliaPosts: 1097 |
Playing around with colours on the CMM2 & Jim's TFT Colour Prog. Type for example ? hex$(RGB(BLUE)) I getF0000FF Entering the hex number into TFT Colour, I get the correct colour Typing ? hex$(RGB(CYAN)) I getF00FFFF 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: CanadaPosts: 1132 |
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: AustraliaPosts: 1097 |
Ok, thanks ChopperP |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6283 |
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: AustraliaPosts: 6283 |
Bug should be fixed. TFTcolour.zip Jim VK7JH MMedit |
||||
Chopperp![]() Guru ![]() Joined: 03/01/2018 Location: AustraliaPosts: 1097 |
Thanks Jim. That was quick. Brian ChopperP |
||||
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |