Author Topic: LadyLeala's "Unofficial Guide to colored text using hex code"  (Read 302 times)

0 Members and 1 Guest are viewing this topic.

Offline Decilation

  • SWG Ensign
  • *****
  • Posts: 1,137
  • Force: 64
  • A Relic of the Past.
    • View Profile
Guide writing, describing, guiding, etc. credit goes to  LadyLeala of SWGEmu. I only copy/pasted it here for users that don't want to go off-site for another guide due to my guide in progress "HomeOwner's Guide" -- I do not take credit for this guide at all. Original guide link is here




Ok, here's my unofficial guide to the ambiguous "hex colors":
 
DEFINITION
"Hex" is short for "Hexadecimal", which means: "Of, relating to, or based on the number 16"
 
Now what the heck does that have to do with colors??  Well, I'll get to that.
 
It's actually kinda easy, once you understand the basic structure of these numbers.
 
 
BASIC STRUCTURE
Normally we count to 16 like this:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
 
But, in the hexadecimal system, you count to 16 using only a single digit... like this:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
 
So the letter A would represent the number 10.  And (oddly) the number 0 in hexadecimal would be the number 1 in regular counting.  You just have to shift your thinking a little.
 
For purposes of making colors in Star Wars, there are 6 hexadecimal numbers that are used.  They are used in three pairs of two numbers.  For example FFFFFF is a code you might see, and it happens to represent the color WHITE (I'll explain that shortly).
 
 
BASIC COLORS
Next, in computers, there are THREE BASIC COLORS that we are working with.  Now you'll have to forget a bit about what you learned in art class, because this is computer land.  So the color wheel is a little skewed.
 
The three basic colors we are dealing with here are RED, GREEN, and BLUE.  And you mix various amounts of each of these colors to create a very broad spectrum.  Virtually any color can be made on a computer using these three colors.
 
 
COLOR RANGE
This is perhaps the trickiest part of making your colors.  I'm going to try and explain it simply.
 
The three pairs of numbers used in the color code in the game each control the AMOUNT of each of the three BASIC COLORS to use.  For example, the code "00" represents ZERO of that particular color.  So if you used "00" in the very first two spaces for your code, then there would be NO red color in your text.
 
Conversely, the code "FF" is at the opposite end of the scale, and shows that you have the amount of red being used as high as it can go (namely, a very bright red color like this).
 
So 00 and FF are the two extremes here.  It's the numbers in between that get to be tricky to figure out.  So let me put down a couple of examples, and hopefully this'll make more sense.
 
I listed the number sequence above to count to 16 using hexadecimal.  Now I'm going to use TWO hexadecimal digits, and show you how the sequence goes:
 
00, 01, 02, 03, 04, 05, 06, 07, 08, 09, 0A, 0B, 0C, 0D, 0E, 0F, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1A, 1B, 1C, 1D, 1E, 1F, 20, ... etc up to FF.
 
Are you following me here?
 
So you can see the range here.  Depending on which pair of letters/numbers you enter, you will get varying degrees of that particular color.
 
 
THE SIX CHARACTERS OF THE CODE
So now that you've got some fundamentals down... it's time to show you how SIX of these numbers work with the three colors:  RED, GREEN, and BLUE.
 
They go in that exact order when you are making your code.  Like this:
 
FF0000 - This shows that we're using "FF" for RED and then "00" for both GREEN and BLUE.  The color that this will make is of course RED.
 
00FF00 - In this one, the "FF" is put in the middle, which represents GREEN.  Since the other two are both "00", the result here will be GREEN.
 
0000FF - And of course, this code will make the color BLUE.
 
 
MIXING COLORS
Now we get to mix the colors!  Yippee!!!
 
Okay, if you mix RED and BLUE you get PURPLE.  Does everyone know that?  It works the same way with this code.
 
FF00FF - makes PURPLE.
 
Oddly, there are a couple weird combinations to get some other common colors.... in computers, you mix RED and GREEN to make YELLOW.  (Sorry for you artistic folk who say this is not so!  I assure you, it is. )
 
FFFF00 - makes YELLOW.
 
Another odd one is CYAN.  For this one, if you mix GREEN and BLUE, you get CYAN.
 
00FFFF - makes CYAN.
 
The last odd one that I can think of is WHITE.  But it's not really odd if you know about prisms and rainbows.  If you mix an equal amount of ALL three colors, you will get various shades of WHITE.
 
FFFFFF - Bright WHITE
AAAAAA - LIGHT GRAY
999999 - GRAY
555555 - DARK GRAY
000000 - BLACK
 
 
THE FINAL TOUCHES
Now we're on the last stretch...  you've got to mix it all together. 
 
All of the above examples that I stated were for BRIGHT colors.  And it certainly did not include EVERY color.  You may need to experiment for awhile until you get it just right.  But here's a couple more examples:
 
8B4500 - BROWN
EE7600 - ORANGE
 
 
USING THESE CODES IN STAR WARS
So now you want to implement these colors in the game?  Well, keep in mind that the only things you can use these color codes on are:  Structure names, backpacks, Spatial typing (including tells and such), and emails.
 
In order to tell the game that you are using a color code, you have to include a BACKSLASH "\" followed by a NUMBER SIGN "#".  So it would look kind of like this:
 
\#FF00FF - This code in the game would make all the text after it appear PURPLE.
 
The text that you want to be purple should start immediately after the last letter/number in the color code.  You can use a second BACKSLASH "\" at the end of your code if it makes it easier for you.
 
\#FF00FFHello!
...and...
\#FF00FF\Hello!
 
...would both look just like this in the game:
 
Hello!
 
THE WRAP-UP
That's about all I have for my guide folks.  Oh yes, and it IS possible to use more than one color code in a single name for something.  Just insert a fresh \#xxxxxx before each color change.  Of course you have to use numbers/letters in place of the x's.
 
Let me know if you have any questions!  If I need to make any changes to my post to make corrections, you'll have to wait until I become a veteran.
Wayfarer's Designs

Relocating on CHILASTRA

CLOSED UNTIL FURTHER NOTICE

Offline NeenerNeener

  • Contributor
  • *
  • Posts: 77
  • Force: 10
    • View Profile
Does this really warrant a guide? jesus, just use a hex color generator like this:

http://www.w3schools.com/colors/colors_picker.asp

Offline Decilation

  • SWG Ensign
  • *****
  • Posts: 1,137
  • Force: 64
  • A Relic of the Past.
    • View Profile
Actually, to many, yes.

Also, as you'll note in the large bold text, this is merely a copy/paste for people that don't like to leave one website for another when clicking a link.

Not everyone has experience in SWG, and my goal is to make their experience a better one that doesn't require that they look up every single thing they come across.

Offline idrinth

  • Community Member
  • Posts: 1
  • Force: 0
    • View Profile
Sorry about being slightly picky, the guide itself is nice to have for someone who never tried coloring texts ingame before.

BASIC STRUCTURE
Normally we count to 16 like this:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16
 
But, in the hexadecimal system, you count to 16 using only a single digit... like this:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
 
So the letter A would represent the number 10.  And (oddly) the number 0 in hexadecimal would be the number 1 in regular counting.  You just have to shift your thinking a little.
0 is still zero, in both hexadecimal as well as decimal counting.
The same way 10 is not single digit in decimal number systems, F is equal to the base of the system -1(i.e. 15), meaning you got 16(dec) = 10(hex), while 15(dec) = F (hex).


That rgb-colors start with 0 is independant of the numerical system, they always stretch from 0-255(dec) or 0-FF(hex) as in no trace of the color to as much of the color as possible.