Quote

Originally posted by MaNiAc66:

**Also with ship paint outfit you need to change a color into a 5 digit long number..... how? i don't understand the 5bit 15bit conversion process.

**

I had a bit of trouble with this, myself. Then I realized I was being an idiot and making unwarranted assumptions, and things started working for me. : )

Here's an explanation: Most other places in Nova, colors are stored as HTML color codes. HTML color codes are stored in hexadecimal. Hexadecimal is a base-16 number system (decimal is a base-10 number system). Hex is used as shorthand for binary numbers, because hex is easier to read than a long string of 1s and 0s.

HOWEVER, in this case, the color is stored as a 16-bit binary number. (That is, a binary number which is 16 digits long.) Specifically, a leading zero followed by three groups of five bits each. The first group represents the value of red, the second represents the value of green, and the third group represents the value of blue. (Value=intensity of the color.)

Now a short and hopefully understandable brief on binary. The easiest way to understand binary, I think, is to compare it to decimal. All number systems work in the same way, so it's not difficult to convert numbers between bases once you get used to it. For example, the decimal number 12345. What that number represents is 5 ones, 4 tens, 3 hundreds, 2 thousands, and 1 ten-thousand. In other words, 5x1 + 4x10 + 3x100 + 2x1000 + 1x10000. An alternate way of expressing that is to say that 12345 represents 5x10^0 + 4x10^1 + 3x10^2 + 2x10^3 + 1x10^4. (For those unfamiliar with the notation, 10^4 means "ten raised to the fourth power.") Okay? Kind of odd, I know. But it's just a different way of thinking about things. Now it turns out that any number base can be represented using that last method. The binary number 1000, for example, means 0x2^0 + 0x2^1 + 0x2^2 + 1x2^3. 2^3 = 8, so 1000 is equal to 8. 1001 is equal to 9, because it's 1x2^0 + 1x2^3. (Anything raised to the zeroth power is 1.) 1111 is 15. Larger binary numbers work just like larger decimal numbers, in that the power keeps increasing. Binary 10000 is 1x2^4 + 0. 2^4 = 16, so 10000 is 16. Notice that the value of 10000 is one more than the value of 1111? What's 9999 + 1? The one carries all the way out to the leftmost position, leaving zeroes behind.

Anyway, what good does this do you in producing paint values? Well, binary numbers with odd numbers of digits aren't commonly used, so you will likely have no luck finding a conversion program to help you with that task. Here's how I did it: I accessed the Finder's color wheel (I did it through the Appearance control panel), and switched to the HTML picker. I disabled "snap to HTML colors" and moved the sliders until I liked what I saw. The HTML color picker provides you with the hexadecimal code for the color you picked. Specifically, a six-digit hex number. I mentioned earlier that hex is used as shorthand for binary, because it's easier to read. Here's what I meant: a single hex digit represents four binary digits. Why? One hex digit can represent values from zero to fifteen (0-F). Four binary digits can represent the same range. Thus, any four-bit binary number can be represented by a single hex digit. Hexadecimal, by the way, is base-16. Zero through nine are represented as they are in decimal (0-9). Ten through fifteen are represented using uppercase letters A-F. D=14=1110.

I can hear you asking, "Okay, why do I need to know this?" You need to know this because knowing this will allow you to convert the HTML color code from the HTML picker to a 15-bit binary number to use in Nova. Now you know that each hex digit is four bits (Bit = **B** inary dig **IT** , BTW), so you know that that six-digit color code from the HTML picker is equivalent to a binary number. Hit (url="http://"http://www.versiontracker.com")www.versiontracker.com(/url) and search for "Base Helper". It's a nifty little app that has been very helpful to me in finding paint values. It converts numbers between bases. If you plug your hex code (base 16) in to Base Helper (BH), you can convert it (quickly and easily) to binary (base 2). Now, an HTML color code is two hex digits per color, like so: RRGGBB. That is 8 bits per color, which is too many for our purposes. Thus, you've got to trim it down. This is where the preceding primer on number systems comes in handy.

The number 99D1CA represents a sort of nice sea-green. Looking at the hex, you can see that the red channel, the first two digits, is at a bit more than half intensity (zero intensity being 00 and full intensity being FF, and half intensity being 7F). So the first five-bit part of your number for Nova needs to be somewhat higher than half of its possible value. The highest possible five-bit value is 11111, which equals 31 (which you can figure using BH), so your red value should be approximately 18. 18=10010, so there's your first five bits. The green channel has a value of D1, which is a little more than 75% of its maximum value. 75% of 31 is 24, so your green channel should be about 26. 26=11010, so there's your second group. The blue channel is CA, which is only a bit less than D1, roughly speaking. So the third group should be approximately 21 or 22. 21=10101. So the Nova color code for a nice sea-green is 100101101010101. You can pad it with the leading zero, but it doesn't change the value any more than putting a zero in front of a decimal number changes its value (0234=234). Nova Tools converts the binary into decimal for easier reading, and you can do the same. Our Nova color code for a nice sea-green is 19285 in decimal, so that's what you can plug in to the proper field in Nova Tools.

Note that lighter colors are not necessarily higher values.Pure blue (no red, no green, maximum blue) is represented by decimal 31. Pure red is 31744. Increasing the intensity of the red channel will have a great effect on the value of the 15-bit number, because red is the digits furthest to the left (thus, the digits with the highest powers). So don't assume that you can just increase a number by a relatively large amount to get a brighter shade of the same color.

Phew. I sincerely hope that helps you out. Feel free to e-mail me at mr.lothario@cox.net if you need clarification, and I'll do my best to help you out. : )

--Nathan