Counter-Strike 2 gives you extensive control over how the game looks and feels. You can adjust a wide range of settings to match your preferences, from gameplay elements to visual details.
That flexibility lets you experiment with creative options, including a rainbow HUD setup that changes your interface colors as you play. If you enjoy personalizing your experience, you can use these tools to make your display stand out while keeping full control over performance and usability.
What Is the CS2 Rainbow HUD?
The CS2 Rainbow HUD changes your heads-up display color as you play. Each action—such as moving, firing, or reloading—triggers a different HUD color automatically.
You set it up with console commands that link movement keys to specific HUD color values. As you press those keys, your interface shifts colors in real time.
Key effect:
- HUD color updates dynamically based on in-game input
Create and Configure the Rainbow HUD Config File in CS2
You should use a config file to run multiple HUD color commands at once instead of typing them into the console every time. A dedicated .cfg file lets you execute the full setup with a single command during a match.
Start by navigating to:
C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\cfg
Create a new text file in this folder and name it:
rainbow.cfg
Open the file in a text editor and paste the commands below exactly as written.
alias colorsToggle "colorsOn"
alias colors "colors0"
alias colors0 "cl_hud_color 0; alias colors colors1"
alias colors1 "cl_hud_color 1; alias colors colors2"
alias colors2 "cl_hud_color 2; alias colors colors3"
alias colors3 "cl_hud_color 3; alias colors colors4"
alias colors4 "cl_hud_color 4; alias colors colors5"
alias colors5 "cl_hud_color 5; alias colors colors6"
alias colors6 "cl_hud_color 6; alias colors colors7"
alias colors7 "cl_hud_color 7; alias colors colors8"
alias colors8 "cl_hud_color 8; alias colors colors9"
alias colors9 "cl_hud_color 9; alias colors colors10"
alias colors10 "cl_hud_color 10; alias colors colors11"
alias colors11 "cl_hud_color 11; alias colors colors12"
alias colors12 "cl_hud_color 12; alias colors colors13"
alias colors13 "cl_hud_color 13; alias colors colors0"
alias +colorsForward "+forward; colors;"
alias -colorsForward "-forward; colors;"
alias +colorsBack "+back; colors;"
alias -colorsBack "-back; colors;"
alias +colorsLeft "+left; colors;"
alias -colorsLeft "-left; colors;"
alias +colorsRight "+right; colors;"
alias -colorsRight "-right; colors;"
alias +colorsCrouch "+duck; colors;"
alias -colorsCrouch "-duck; colors;"
alias +colorsFire "+attack; colors;"
alias -colorsFire "-attack; colors;"
alias colorsBind "bind d +colorsRight; bind a +colorsLeft; bind w +colorsForward; bind s +colorsBack; bind ctrl +colorsCrouch; bind mouse1 +colorsFire;"
alias colorsUnbind "bind d +right; bind a +left; bind w +forward; bind s +back; bind ctrl +duck; bind mouse1 +attack;"
alias colorsOn "alias colors colors0; alias colorsToggle colorsOff; colorsBind;"
alias colorsOff "cl_hud_color 4; alias colorsToggle colorsOn; colorsUnbind;"
bind k "colorsToggle;"
These aliases cycle through all available cl_hud_color values. Each movement key, crouch input, and primary fire triggers the next color in the sequence.
The script also creates a toggle system:
| Key | Action |
|---|---|
| K | Enable or disable rainbow HUD |
| W, A, S, D | Move and rotate HUD color |
| CTRL | Crouch and rotate HUD color |
| Mouse1 | Shoot and rotate HUD color |
After saving the file, launch Counter-Strike 2. Open the developer console and run:
exec rainbow.cfg
The rainbow effect will activate for your current session. You must execute the config again after restarting the game because CS2 does not keep it active automatically.
Press K at any time to restore the default HUD color and return your standard key bindings.