Blockland Forums > Modification Help

RGB Color Codes?

Pages: (1/2) > >>

N0B0-Films:

I don't understand RGB color coding i am trying to edit rainbow mod for a friend and i don't understand the colors.



--- Code: ---function JuiceboxPlayerLoop()
{
    if($JuiceboxPlayerCount > 63)
$JuiceboxPlayerCount = 0;

    $R=0.5+0.5*mSin($JuiceboxPlayerCount*3.14/16.0);
    $G=0.5+0.5*mSin($JuiceboxPlayerCount*3.14/16.0+21.0);
    $B=0.5+0.5*mSin($JuiceboxPlayerCount*3.14/16.0+42.0);
    $pref::Avatar::PackColor=$[b]B[/b] SPC $[b]P[/b] SPC $[b]B[/b] SPC "1";
    $pref::Avatar::AccentColor=$B SPC $P SPC $B SPC "1";
    $pref::Avatar::SecondPackColor=$B SPC $P SPC $B SPC "1";
    clientcmdupdateprefs();
    $JuiceboxPlayerCount++;
    $JuiceboxPlayer=schedule(100,0,JuiceboxPlayerLoop);
}
--- End code ---

The letters "R" "G" and "B" are part of the color cycle.

If they are changed they have different effects on the color such as:

BGC - Cycles from Red to Green to Orange

I don't understand how they work i want it to cycle certain colors can someone help?


Placid:

First off, I wouldn't suggest using rainbow player mod as it is pretty hated, but whatever, your choice.

RGB values are color values. It's saying how much red, green and blue to put into the color you're making. The "1" at the end of the $Pref::Avatar statements is saying that it's not transparent.
Basically, if you know your basic color mixings, you'll be alright. If you don't, go into Blockland, press "Player" on the main menu and click "Colorset". Play around with the sliders awhile to familiarize yourself with them.

Nexus:

what is in that code is actually Hex color, not RGB, but they are similar.

RGB uses a mathematical 0-255 scale using multiples of 15
Hex color uses a scale of 0.000000 to 1.000000

Hex includes a fourth value, "A", which is the opacity (trans) of the color.  RGB only has this option in RGBA format.

Sulfate:

also incase you're wondering what A stands for (not what it does) the answer to that is "Alpha" as in an alpha channel

the more you knooooow..

Headcrab Zombie:


--- Quote from: Nexus on July 16, 2011, 02:20:37 AM ---RGB uses a mathematical 0-255 scale using multiples of 15
Hex color uses a scale of 0.000000 to 1.000000

--- End quote ---
Not sure where your getting multiples of 15, and 0-1 is RGB(/decimal) as well
Hex(or hexadecimal) is 16 digits, 0-9 and A-F. A hex color code would be something like 4D2E56

Pages: (1/2) > >>

Go to full version