: K-Meleon Forum
General discussion about K-Meleon.
[quote=JohnHell] [quote=siria] Weird... but multiplication or addition don't make sense: how would the browser know what is red, what green, what blue? My first thought was that perhaps it's with transparency, because that's usually 8 digits, 4x2 in hex format (either ARGB or RGBA) Hex format means 0-9 is extended to 0 1 2 3 4 5 6 7 8 9 A B C D E F So the range for each double number is: 00...ff, with the first being 16x 'heavier' than the second, similar to decimal system. Then again: he posted *only* numbers, and those definitely wouldn't result in white. In that system 16-777215 would be a dark yellow and 167772-15 a dark cyan if I'm not mistaken. Remains weird...[/quote] How it knows?, because it is in order. And, by the way, I don't think alpha channel are used for this kind of features. But wouldn't be a problem. Let's say we want a dark grey with decimal values up 255 for each color, Red 1, Green 1, Blue 1. In binary would be [color=#FF0000]00000001[/color][color=#00FF00]00000001[/color][color=#0000FF]00000001[/color]. Even if you provide as [color=#FF0000]1[/color][color=#00FF00]00000001[/color][color=#0000FF]00000001[/color] because left 0's don't count, it's easy to calculate what are the missing 0's as the in binary we read from right to left and we already have 2 complete bytes of Green and Blue, the remaining is Red. If we add alpha channel, it's the same. You only need to know if the alpha channel is at the beginning or at the end, this is, ARGB or RGBA (if it is as HTML coding, will be this one). Continuing with the example above, we will have that [color=#FF0000]00000001[/color][color=#00FF00]00000001[/color][color=#0000FF]00000001[/color] equals 65793 which should match dark grey. And, what happens when there is a 0 value? It's the same. Let's say a dark pink color as Red 1, Green 0, Blue 1. That equals to [color=#FF0000]00000001[/color][color=#00FF00]00000000[/color][color=#0000FF]00000001[/color] or [color=#FF0000]1[/color][color=#00FF00]00000000[/color][color=#0000FF]00000001[/color] that equals to 65537 And if Red and Green are both 0, the same but will be a lower value. Calculate 8 binary digit for each color is not a problem for the browser. Also, in Hex or decimal with alpha channel wouldn't be 16777215 but 4294967295 for a full transparent white or 4294967040 for white opaque as RGBA or 16777215 for ARGB. There will be not 3 bytes, but 4. As I can't test in 1.6 I can't confirm, but should be this way. [s]If Dorian doesn't come and tell us :D[/s] EDIT: duffy98, it works, the prefs works on 1.6, I thought they didn't but they work. [b]EDIT2: It works but is not RGB, but BGR, Blue, Green, Red.[/b][/quote]
K-Meleon forum is powered by