Outils pour utilisateurs

Outils du site


back2root:archives:denthor:part-02

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Dernière révisionLes deux révisions suivantes
back2root:archives:denthor:part-02 [2023/05/20 23:24] – [PART 02 : Colors palette] fraterback2root:archives:denthor:part-02 [2023/05/20 23:26] – [What is the Pallette?] frater
Ligne 19: Ligne 19:
 Most of these quesions will be answered in this, the second part of my Trainer Series for Pascal. Most of these quesions will be answered in this, the second part of my Trainer Series for Pascal.
  
-==== What is the Pallette? ====+==== What is the Palette? ====
  
 A few weeks ago a friend of mine was playing a computer game. In the game there was a machine with stripes of blue running across it. When the machine was activated, while half of the the blue stripes stayed the same, the other half started to change color and glow. He asked me how two stripes of the same color suddenly become different like that. The answer is simple:  A few weeks ago a friend of mine was playing a computer game. In the game there was a machine with stripes of blue running across it. When the machine was activated, while half of the the blue stripes stayed the same, the other half started to change color and glow. He asked me how two stripes of the same color suddenly become different like that. The answer is simple: 
  
-the program was changing the pallette. As you know from Part 1, there are 256 colors in MCGA mode, numbered 0 to 255. What you don't know is that each if those colors is made up of different intensities of Red, Green and Blue, the primary colors (you should have learned about the primary colors at school). These intensities are numbers between 0 and 63. The color of bright red would for example be obtained by setting red intensity to 63, +the program was changing the palette. As you know from Part 1, there are 256 colors in MCGA mode, numbered 0 to 255. 
-green intensity to 0, and blue intensity to 0. This means that two colors can look exactly the same, eg you can set color 10 to bright red and color 78 to color bright red. If you draw a picture using both of those colors, +
-no-one will be able to tell the difference between the two.. It is only when you again change the pallette of either of them will they be able to tell the difference. Also, by changing the whole pallette, you can obtain +
-the "Fade in" and "Fade out" effects found in many demos and games.+
  
-Pallette manipulation can become quite confusing to some people, because colors that look the same are in fact totally seperate.+What you don't know is that each if those colors is made up of different intensities of Red, Green and Blue, the primary colors (you should have learned about the primary colors at school). 
 + 
 +These intensities are numbers between 0 and 63. The color of bright red would for example be obtained by setting red intensity to 63, green intensity to 0, and blue intensity to 0.  
 + 
 +This means that two colors can look exactly the same, eg you can set color 10 to bright red and color 78 to color bright red.  
 + 
 +If you draw a picture using both of those colors, no-one will be able to tell the difference between the two..  
 + 
 +It is only when you again change the palette of either of them will they be able to tell the difference.  
 + 
 +Also, by changing the whole palette, you can obtain the "Fade in" and "Fade out" effects found in many demos and games. 
 + 
 +Palette manipulation can become quite confusing to some people, because colors that look the same are in fact totally separate.
  
 ==== How do I read in the pallette value of a color? ==== ==== How do I read in the pallette value of a color? ====
back2root/archives/denthor/part-02.txt · Dernière modification : 2023/05/20 23:28 de frater