|
|
Colour & Alpha tutorial Difficulty: Beginner |
| Category: CS:S > Scripting | Author(s): J2K |

//==================================
//Colour and alpha tutorial by J2K!
//==================================
NOTE: The following commands only work in 1.6, this tutorial is to teach you what RGBA is, NOT a script for crosshair colors. I just feel everyone from both versions of the game should learn how to use RGBA properly.
Ok, so basically a lot of people at this site are breaking my head by typing commands like cl_crosshairalpha 9999999999999.
This is messy, incorrect & unnecessary.
So it is time for a tutorial!
//Counter-Strike Source colour commands
For this example i will use the crosshair color command.
cl_crosshaircolor 255 255 255
The three numbers represent the three primary colours, red, green & blue in respective order. The different strengths of each primary colour are added together to form a final mixed colour. This is known as RGB code.
The minimum for each value is 0.
The maximum for each value is 255.
If all three values are 0, you make black.
If all three values are 255, you make white.
Remember pre-school? Blue + yellow = green. This is still true in RGB code.
Now when choosing your crosshair colour, try to keep this in mind, and don't use numbers higher than 255 because it is unnecessary.
//Counter-Strike Source alpha commands
For this example i will use the crosshair alpha command. Be sure to turn on cl_crosshairusealpha 1 before trying to adjust the crosshair alpha.
Basically, alpha refers to the opacity (solid) or transparency (see through) of an object. For uniformity's sake, they have made this work similar to RGB code.
The minimum for the alpha value is 0 (fully transparent).
The maximum for the alpha value is 255 (fully opaque).
Hopefully this guide will put an end to this mindless 999999999999999999 settings i see in far too many config files / tutorials!
Jay.
|
| Added: 1 year ago | Tags: colour, color, alpha, max, maximum, transparency |
 Add Feedback Provide constructive feedback. What is "constructive"?You cannot post yet!Get involved on FPSB by posting your thoughts. Give authors your feedback to help them develop. To post in this submission register or login. |
 You cannot assess yet!Moderating FPSB is in your hands - when you assess a submission your vote determines its success or failure. To vote on this submission register or login. This Tutorial in a nutshell... No stamps recordedYou cannot stamp yet!Stamps let you apply characteristics to submissions to help others understand them. To stamp this submission register or login.
 |
Sabotage Studios Originality, Creativity, Simplicity |
| Membership: On Request |
| Primary Skills: ? |
| Inception: 2 years ago |
Want more? Find related tuts. |