Welcome to the OzoneAsylum FaqWiki
Frequently Asked Questions
Webdesign

How do you calculate the average of two (or more) colours? Pages that link to <a href="https://ozoneasylum.com/backlink?for=5407" title="Pages that link to How do you calculate the average of two (or more) colours?" rel="nofollow" >How do you calculate the average of two (or more) colours?\

From InI about doing it manually:

quote:
Yes, easy, turn them to decimal, then compute the average, and turn them back to hex =)

For instance: FF = F*16+F = 15*16+15 (F being 15 in hexadecimal notation).

Or: AE = A*16+E = 160+14 = 174

And so on...
To understand this, try the same with decimal numbers:
140, for instance, = 1*10^2 + 4*10^1 + 0*10^0 (^ meaning "exponent").
Or binary, 101 = 1*2^2 + 0 * 2^1 + 1 * 2^0 = decimal 5.



------------------------
Relevant threads:

calculating the average of two hex colors?

------------------------
Relevant links:

Color Blender - a very useful tool.

-------------------------
Relevant FAQs:

Can you direct me to good resources on colour?

___________________
Emperor

(Added by: Emperor on Sun 12-Oct-2003)

(Edited by: DL-44 on Sun 12-Oct-2003)

« BackwardsOnwards »

Show Forum Drop Down Menu