PDA

View Full Version : cm3 (98/99) coloured attributes



MarcoVanBast
08-04-20, 05:51 PM
.....

MarcoVanBast
08-04-20, 07:08 PM
solved

Nick+Co
08-04-20, 07:33 PM
[EDX*2+9660F6] ;)

MarcoVanBast
09-04-20, 07:49 AM
Nick

yeah)

now i need to understand how to convert RGB into 16 bit (2 bytes) colour

e.g Pure red should be F800 not ff0000 (like usual hex colour)

maybe someone know online converter? All converters i have using 3 bytes hex values

MarcoVanBast
09-04-20, 07:51 AM
all i v found is that, need to try


RRRRRGGGGGGBBBBB (most significant bit is leftmost)

The formula (C-notation) to get a 16-bit color value from the red/green/blue parts is as follows:

color_16_bit = (red << 11) + (green << 5) + blue

where red and blue has a range of 031 and green has a range of 063, the maximum value for red/green/blue refers to 100% color intensity. Shifting red left by 11, shifting green left by 5 and adding the shifted red and green value and blue together delivers the 16-bit color value.

MarcoVanBast
09-04-20, 07:59 AM
found

that works great

https://ee-programming-notepad.blogspot.com/2016/10/16-bit-color-generator-picker.html

Mark
09-04-20, 10:12 AM
Why do you keep going back to your original posts and soft-deleting them or deleting the text from it?

MarcoVanBast
09-04-20, 02:03 PM
Why do you keep going back to your original posts and soft-deleting them or deleting the text from it?

it was a huge post with lot of code, and zero usefull information

MarcoVanBast
09-04-20, 02:38 PM
but i guess you right, wilnnot do it in future

MarcoVanBast
09-04-20, 02:55 PM
cm3 fonts rather bad with original colours so i cahnged it a little, right now it is so

https://i.imgur.com/YBozmyj.jpg

adnous
24-05-20, 03:08 PM
cm3 fonts rather bad with original colours so i cahnged it a little, right now it is so

https://i.imgur.com/YBozmyj.jpg

Hi Someone can explain me how and where to modify the color like red for notes greather or equal to 15, dark yellow for notes between 10 and 14 and light yellow for notes less than 10??