| 06-19-2006, 10:40 AM | #1 |
What would I put in percentages if I wanted my floating text to be: Red Black Blue Brown |
| 06-19-2006, 11:38 AM | #2 |
red - 100%,0%,0% black - 0%,0%,0% blue - 0%,0%,100% brown - no clue XD but if you tell me the value in the 0-255 scale i can figure it out... |
| 06-19-2006, 11:51 AM | #3 |
Get any colorprogram, Paint will do. Just mix a color and check its RGB values. If they are 0-255 rather than a percentage (0-100), multiply each value with 100/255 |
| 06-19-2006, 11:54 AM | #4 |
Try this tool... http://www.wc3campaigns.net/showthread.php?t=79661 Or use chaos spectrum, for all your color-coding needs. |
| 06-20-2006, 04:24 PM | #5 |
Brown - 51%, 25%, 0% I think that's right. |
| 06-20-2006, 04:38 PM | #6 |
JASS:function Colour_PercentTo255 takes real percent returns real local real r = (percent / 100) * 255 if(r > 255.) then return 255. elseif(r < 0.) then return 0. endif return r endfunction function Colour_255ToPercent takes real amount returns real local real r = (amount / 255) * 100 if(r > 100.) then return 100. elseif(r < 0.) then return 0. endif return r endfunction They should work fine EDIT: Added Colour_ infront of function names to aviod conflict with Blizzard functions. EDIT2: Made the functions not possible to return out of bounds reals |
