Hello everybody, I've a question, can we convert rgb and hex values to echo values like [#FF0000]/RGB(255,0,0) is \x000304.
Quote from: Xmair on Dec 04, 2015, 04:43 PMHello everybody, I've a question, can we convert rgb values to echo values like [#FF0000] is \x000304.
i Think we can't
I need that too!
Btw what u mean? Hex to echo cols or RGB to echo cols?
Edited.
What do you need those for?
I wrote a function for my server.
BASE16_TABLE <- "0123456789ABCDEF";
function rgbToTxt(rgb) {
local str = "[#"+
BASE16_TABLE[(rgb.r&0xf0) >> 4].tochar()+BASE16_TABLE[rgb.r&0x0f].tochar()+
BASE16_TABLE[(rgb.g&0xf0) >> 4].tochar()+BASE16_TABLE[rgb.g&0x0f].tochar()+
BASE16_TABLE[(rgb.b&0xf0) >> 4].tochar()+BASE16_TABLE[rgb.b&0x0f].tochar()+"]";
return str;
}
The index 'r' doesn't exist. It doesn't work, can you tell us how to make it work?
This is what I tried:- exec rgbToTxt(255)
Try using exec rgbToTxt(RGB(255,0.0));
Anyway, I needed the echo one as I don't have all the echo colors.
@Thijn
const ICOL_WHITE = "\x000300";
const ICOL_BLACK = "\x000301";
const ICOL_BLUE = "\x000302";
const ICOL_GREEN = "\x000303";
const ICOL_RED = "\x000304";
const ICOL_BROWN = "\x000305";
const ICOL_PURPLE = "\x000306";
const ICOL_ORANGE = "\x000307";
const ICOL_YELLOW = "\x000308";
const ICOL_LGREEN = "\x000309";
const ICOL_CYAN = "\x000310";
const ICOL_LCYAN = "\x000311";
const ICOL_LBLUE = "\x000312";
const ICOL_PINK = "\x000313";
const ICOL_GREY = "\x000314";
const ICOL_LGREY = "\x000315";
const ICOL = "\x0003";
const ICOL_BOLD = "\x0002";
const ICOL_ULINE = "\x0031";
All the colors^^^
I found a better way to do it.
bold and underline is a color? never knew!
Quote from: NE.CrystalBlue on Dec 05, 2015, 01:49 PMbold and underline is a color? never knew!
No they aren't!
These are just the things I got from the old FPS Echo scripts.