Tutorial Hexadecimal and color codes

bOb666777

Stand against the ugly world domination face!
Reaction score
117
I noticed a lot of people needed help from a special program or a website to know what color codes meant what color. And I just thought this would help them make their own color codes faster, without needing a reference.

Let's get started

So, what exactly is hexadecimal and what's the link between it and color codes?

Hexadecimal (also known as Hex, Hexa and Base-16) is a numeral system that uses 16 as a base number. A 6 digits number with 0x before it means it is in hexadecimal. Your everyday numeral system is called decimal. We will use it as a comparison to the hexadecimal system. Decimal uses 10 as a base, and hexadecimal uses 16. That means the second number is worth 16, and the third, 256, and so on always multiplying by 16.

So, to obtain the decimal equivalent of an hex number, you multiply the number at the first digit by 1, then you multiply the 2nd digit by 16, add it to your current sum, then multiply the third digit by 256, and add it to the current sum, and so on.
Basically,
Code:
Hex       Decimal
0x000001 = 1
0x000010 = 16
0x000100 = 256
0x000021 = 33
0x001000 = 4096

As numbers go on, it can get hard to calculate, a calculator could be useful. Especially if it has a hex to dec and dec to hex function.

But then you ask, yeah but, if 0x000009 is 9 and 0x000010 is 16, what are 10, 11, 12, 13, 14 and 15? They are represented by letters, 10 being A, 11 being B, 12 being C, 13 being D, 14 being E and 15 being F.

so,
Code:
Hex       Decimal
0x00000C = 12
0x00001F = 31
0x0000FF = 255
0x00004A = 74

Oh, that's cool... I guess.... But how will that help me make color codes?

Color codes are made out of 3 groups of 2-digits hex numbers. Each group is a color. You probably noticed a lot of colorings (like Art - Tinting Color, in object editor) use 3 numbers located between 1 and 255. And what's the biggest 2 digits number we can have in hex (not including 0's)? 0xFF, or 255. Makes sense now? Well yeah, a color code is made like this: |cff (opening tag for a color code in wc3*) + 3 hex numbers, without 0x, because the game already knows those numbers are hex.
The first number is the amount of red in the tint, the second is green and the third is blue.
So a color code like this:
Code:
|cffFFFFFF
would equal to 255 red, 255 green and 255 blue, which is white.

Let's have more examples:
Code:
|cff00FF00
That would be 0 red, 255 green and 0 blue. That would make the text green.

Code:
|cff404040
That would be 64 red, 64 green and 64 blue. That would make a dark gray text.

Code:
|cffBB00BB
That would be 187 red, 0 green and 187 blue. That would make a light purple-violet-ish color.

--------------------
There is technically no end tag for a color code, but you want to make the text white again, so you can use |cffFFFFFF, although there is a shortcut to that: |r. It's the same thing as |cffFFFFFF. It's just shorter to write :D.

__________________
*The real opening tag is |c, but people will usually use |cff, because the color codes actually use 4 groups of numbers, and the first is transparency, but most people will leave it at FF.

That will be all, if you have any question, or think a part of this is hard to understand, let me know, I will try to answer your question and improve the tutorial.
 

Romek

Super Moderator
Reaction score
964
We've got about 60 of these types of tutorials. So don't count on this one getting approved. Sorry.
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
But I searched and I found none...

What's with that.....

Edit:

I searched those words:
Color - No result
Hexadecimal - No result
Colour - 1 result

Found one, but it's not exactly as good, IMO. Using Colour Codes
It just gives you a list of numbers you can use. Mine is actually explaining what those numbers mean.
 

Romek

Super Moderator
Reaction score
964
Pineapples one is more informative and better explained than this one.
And, it's still the same thing.

There's also this one.

I'm sure there were more. They probably were written, just not approved for the same reason as this one.
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
Bleh, I disagree, but I guess I can't really do anything about your choice...... :(
 

Igor_Z

You can change this now in User CP.
Reaction score
61
May i suggest this link.. It has fully constructed color codes, just change the # with |cff and it will work in wc3... I will try to learn ur system, i didn't know that color codes r constructed that way... Thanks for the info, +rep for u
 

bOb666777

Stand against the ugly world domination face!
Reaction score
117
Ummmm, thanks, but that's the opposite of the point of this tut, which is to make it so you don't need a color sheet like that anymore, because it takes forever to find an appropriate color in those.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top