www/p/colors.html
<html>
<head>
<style>
h3 {
color: white;
font-family: Verdana;
padding:0px;
margin:0px;
spacing:0px;
}
.color_label {
color: rgb(127,127,127);
}
</style>
<script type="text/javascript" src="./dist/r2core.js"></script>
<script type="text/javascript" src="./vendors/jquery/dist/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="./vendors/spectrum/spectrum.css" />
<link rel="stylesheet" type="text/css" href="./dist/core.css" />
<script type="text/javascript" src="./vendors/spectrum/spectrum.js"></script>
</head>
<body class='tmp_gui_background'>
<table style=width:100%>
<tr>
<td width="85%" valign=top>
<div style='overflow:hidden'>
<pre>
<font class='tmp_prompt'>[0x000027ba]> </font> <font style='color:#f0f0f0'>pd 42</font>
<font class='tmp_fline'>/</font> <font class='tmp_fname'>(fcn) entry0 1495</font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> </font><font class='tmp_offset'>0x000027ba</font> <font class='tmp_cjmp'>41<font class='tmp_cjmp'>54</font> </font><font class='tmp_push'>push<font class='tmp_reg'> r12</font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> </font><font class='tmp_offset'>0x000027bb</font> <font class='tmp_cjmp'>58</font> </font><font class='tmp_pop'>pop<font class='tmp_reg'> rax</font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> </font><font class='tmp_offset'>0x000027bc</font> <font class='tmp_cjmp'>53</font> </font><font class='tmp_push'>push<font class='tmp_reg'> rbx</font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> </font><font class='tmp_offset'>0x000027bd</font> <font class='tmp_cjmp'>48<font class='tmp_other'>81<font class='tmp_other'>ec<font class='tmp_cjmp'>48<font class='tmp_other'>06<font class='tmp_other'>0.</font> </font><font class='tmp_other'>sub<font class='tmp_reg'> rsp</font>,<font class='tmp_b0xff'><font class='tmp_b0xff'> <font class='tmp_push'>0x648</font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> </font><font class='tmp_offset'>0x000027c4</font> <font class='tmp_cjmp'>49<font class='tmp_other'>89<font class='tmp_other'>f5</font> </font><font class='tmp_mov'>mov<font class='tmp_reg'> r13</font>,<font class='tmp_b0xff'><font class='tmp_reg'> rsi</font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> </font><font class='tmp_offset'>0x000027c7</font> <font class='tmp_other'>89<font class='tmp_other'>bd<font class='tmp_other'>b0<font class='tmp_other'>f9<font class='tmp_b0xff'>ff<font class='tmp_b0xff'>ff</font> </font><font class='tmp_mov'>mov<font class='tmp_b0xff'> </font>[<font class='tmp_b0xff'>rbp</font>-<font class='tmp_b0xff'><font class='tmp_push'>0x650</font>]<font class='tmp_b0xff'></font>,<font class='tmp_b0xff'><font class='tmp_reg'> edi</font></font>
<font class='tmp_fline'>|</font> <font class='tmp_comment'> ; jaja</font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> </font><font class='tmp_offset'>0x000027cd</font> <font class='tmp_cjmp'>48<font class='tmp_other'>8d<font class='tmp_other'>85<font class='tmp_other'>c0<font class='tmp_other'>f9<font class='tmp_other'>f.</font> </font><font class='tmp_push'>lea<font class='tmp_reg'> rax</font>,<font class='tmp_b0xff'><font class='tmp_b0xff'> </font>[<font class='tmp_b0xff'>rbp</font>-<font class='tmp_b0xff'><font class='tmp_push'>0x640</font>]<font class='tmp_b0xff'></font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> </font><font class='tmp_offset'>0x000027d4</font> <font class='tmp_cjmp'>48<font class='tmp_other'>89<font class='tmp_other'>85<font class='tmp_other'>b8<font class='tmp_other'>f9<font class='tmp_other'>f.</font> </font><font class='tmp_mov'>mov<font class='tmp_b0xff'> </font>[<font class='tmp_b0xff'>rbp</font>-<font class='tmp_b0xff'><font class='tmp_push'>0x648</font>]<font class='tmp_b0xff'></font>,<font class='tmp_b0xff'><font class='tmp_reg'> rax</font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> </font><font class='tmp_offset'>0x000027db</font> <font class='tmp_other'>85<font class='tmp_b0xff'>ff</font> </font><font class='tmp_cmp'>test<font class='tmp_reg'> edi</font>,<font class='tmp_b0xff'><font class='tmp_reg'> edi</font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> ,=< </font><font class='tmp_offset'>0x000027dd</font> <font class='tmp_b0x7f'>7f<font class='tmp_other'>05</font> </font><font class='tmp_cjmp'>jg 0x27e4</font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> | </font><font class='tmp_offset'>0x000027df</font> <font class='tmp_other'>e8<font class='tmp_other'>b1<font class='tmp_cjmp'>30<font class='tmp_b0x00'>00<font class='tmp_b0x00'>00</font> </font><font class='tmp_call'>call 0x5895</font>
<font class='tmp_fline'>|</font><font class='tmp_b0xff'> </font><font class='tmp_flow'> | </font> 0x00005895(unk, unk) ; entry0</font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> `-> </font><font class='tmp_offset'>0x000027e4</font> <font class='tmp_cjmp'>48<font class='tmp_other'>8d<font class='tmp_cjmp'>35<font class='tmp_other'>1d<font class='tmp_cjmp'>37<font class='tmp_other'>0.</font> </font><font class='tmp_push'>lea<font class='tmp_reg'> rsi</font>,<font class='tmp_b0xff'><font class='tmp_b0xff'> </font>[<font class='tmp_b0xff'>rip</font>+<font class='tmp_b0xff'><font class='tmp_push'>0x371d</font>]<font class='tmp_b0xff'></font></font> <font class='tmp_comment'>; 0x00005f08 </font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> </font><font class='tmp_offset'>0x000027eb</font> <font class='tmp_cjmp'>31<font class='tmp_b0xff'>ff</font> </font><font class='tmp_math'>xor<font class='tmp_reg'> edi</font>,<font class='tmp_b0xff'><font class='tmp_reg'> edi</font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> </font><font class='tmp_offset'>0x000027ed</font> <font class='tmp_other'>e8<font class='tmp_cjmp'>2e<font class='tmp_cjmp'>32<font class='tmp_b0x00'>00<font class='tmp_b0x00'>00</font> </font><font class='tmp_call'>call sym.imp.setlocale</font>
<font class='tmp_fline'>|</font><font class='tmp_b0xff'> </font><font class='tmp_flow'> </font> 0x00005a20() ; sym.imp.setlocale</font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> </font><font class='tmp_offset'>0x000027f2</font> <font class='tmp_other'>bb<font class='tmp_other'>01<font class='tmp_b0x00'>00<font class='tmp_b0x00'>00<font class='tmp_b0x00'>00</font> </font><font class='tmp_mov'>mov<font class='tmp_reg'> ebx</font>,<font class='tmp_b0xff'><font class='tmp_b0xff'> <font class='tmp_push'>0x1</font></font> <font class='tmp_comment'>; 0x00000001 </font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> </font><font class='tmp_offset'>0x000027f7</font> <font class='tmp_other'>bf<font class='tmp_other'>01<font class='tmp_b0x00'>00<font class='tmp_b0x00'>00<font class='tmp_b0x00'>00</font> </font><font class='tmp_mov'>mov<font class='tmp_reg'> edi</font>,<font class='tmp_b0xff'><font class='tmp_b0xff'> <font class='tmp_push'>0x1</font></font> <font class='tmp_comment'>; 0x00000001 </font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> </font><font class='tmp_offset'>0x000027fc</font> <font class='tmp_other'>e8<font class='tmp_other'>cb<font class='tmp_cjmp'>31<font class='tmp_b0x00'>00<font class='tmp_b0x00'>00</font> </font><font class='tmp_call'>call sym.imp.isatty</font>
<font class='tmp_fline'>|</font><font class='tmp_b0xff'> </font><font class='tmp_flow'> </font> 0x000059cc() ; sym.imp.isatty</font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> </font><font class='tmp_offset'>0x00002801</font> <font class='tmp_other'>85<font class='tmp_other'>c0</font> </font><font class='tmp_cmp'>test<font class='tmp_reg'> eax</font>,<font class='tmp_b0xff'><font class='tmp_reg'> eax</font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> ,==< </font><font class='tmp_offset'>0x00002803</font> <font class='tmp_cjmp'>74<font class='tmp_cjmp'>60</font> </font><font class='tmp_cjmp'>je 0x2865</font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> | </font><font class='tmp_offset'>0x00002805</font> <font class='tmp_other'>c7<font class='tmp_other'>05<font class='tmp_cjmp'>59<font class='tmp_cjmp'>3e<font class='tmp_b0x00'>00<font class='tmp_other'>0.</font> </font><font class='tmp_mov'>mov dword<font class='tmp_b0xff'> </font>[<font class='tmp_b0xff'>rip</font>+<font class='tmp_b0xff'><font class='tmp_push'>0x3e59</font>]<font class='tmp_b0xff'></font>,<font class='tmp_b0xff'><font class='tmp_b0xff'> <font class='tmp_push'>0x50</font></font> <font class='tmp_comment'>; "P" ; 0x00000050 </font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> | </font><font class='tmp_offset'>0x0000280f</font> <font class='tmp_cjmp'>48<font class='tmp_other'>8d<font class='tmp_cjmp'>3d<font class='tmp_other'>f3<font class='tmp_cjmp'>36<font class='tmp_other'>0.</font> </font><font class='tmp_push'>lea<font class='tmp_reg'> rdi</font>,<font class='tmp_b0xff'><font class='tmp_b0xff'> </font>[<font class='tmp_b0xff'>rip</font>+<font class='tmp_b0xff'><font class='tmp_push'>0x36f3</font>]<font class='tmp_b0xff'></font></font> <font class='tmp_comment'>; 0x00005f09 </font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> | </font><font class='tmp_offset'>0x00002816</font> <font class='tmp_other'>e8<font class='tmp_cjmp'>7b<font class='tmp_cjmp'>31<font class='tmp_b0x00'>00<font class='tmp_b0x00'>00</font> </font><font class='tmp_call'>call sym.imp.getenv</font>
<font class='tmp_fline'>|</font><font class='tmp_b0xff'> </font><font class='tmp_flow'> | </font> 0x00005996() ; sym.imp.getenv</font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> | </font><font class='tmp_offset'>0x0000281b</font> <font class='tmp_cjmp'>48<font class='tmp_other'>85<font class='tmp_other'>c0</font> </font><font class='tmp_cmp'>test<font class='tmp_reg'> rax</font>,<font class='tmp_b0xff'><font class='tmp_reg'> rax</font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> ,===< </font><font class='tmp_offset'>0x0000281e</font> <font class='tmp_cjmp'>74<font class='tmp_other'>0f</font> </font><font class='tmp_cjmp'>je 0x282f</font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> || </font><font class='tmp_offset'>0x00002820</font> <font class='tmp_other'>80<font class='tmp_cjmp'>38<font class='tmp_b0x00'>00</font> </font><font class='tmp_cmp'>cmp byte<font class='tmp_b0xff'> </font>[<font class='tmp_b0xff'>rax</font>]<font class='tmp_b0xff'></font>,<font class='tmp_b0xff'><font class='tmp_b0xff'> <font class='tmp_push'>0x0</font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> ,====< </font><font class='tmp_offset'>0x00002823</font> <font class='tmp_cjmp'>74<font class='tmp_other'>0a</font> </font><font class='tmp_cjmp'>je 0x282f</font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> ||| </font><font class='tmp_offset'>0x00002825</font> <font class='tmp_cjmp'>48<font class='tmp_other'>89<font class='tmp_other'>c7</font> </font><font class='tmp_mov'>mov<font class='tmp_reg'> rdi</font>,<font class='tmp_b0xff'><font class='tmp_reg'> rax</font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> ||| </font><font class='tmp_offset'>0x00002828</font> <font class='tmp_other'>e8<font class='tmp_other'>0f<font class='tmp_cjmp'>31<font class='tmp_b0x00'>00<font class='tmp_b0x00'>00</font> </font><font class='tmp_call'>call sym.imp.atoi</font>
<font class='tmp_fline'>|</font><font class='tmp_b0xff'> </font><font class='tmp_flow'> ||| </font> 0x0000593c() ; sym.imp.atoi</font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> ,=====< </font><font class='tmp_offset'>0x0000282d</font> <font class='tmp_other'>eb<font class='tmp_cjmp'>22</font> </font><font class='tmp_jmp'>jmp 0x2851</font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> |``---> </font><font class='tmp_offset'>0x0000282f</font> <font class='tmp_cjmp'>48<font class='tmp_other'>8d<font class='tmp_cjmp'>55<font class='tmp_other'>d0</font> </font><font class='tmp_push'>lea<font class='tmp_reg'> rdx</font>,<font class='tmp_b0xff'><font class='tmp_b0xff'> </font>[<font class='tmp_b0xff'>rbp</font>-<font class='tmp_b0xff'><font class='tmp_push'>0x30</font>]<font class='tmp_b0xff'></font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> | | </font><font class='tmp_offset'>0x00002833</font> <font class='tmp_other'>bf<font class='tmp_other'>01<font class='tmp_b0x00'>00<font class='tmp_b0x00'>00<font class='tmp_b0x00'>00</font> </font><font class='tmp_mov'>mov<font class='tmp_reg'> edi</font>,<font class='tmp_b0xff'><font class='tmp_b0xff'> <font class='tmp_push'>0x1</font></font> <font class='tmp_comment'>; 0x00000001 </font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> | | </font><font class='tmp_offset'>0x00002838</font> <font class='tmp_other'>be<font class='tmp_cjmp'>68<font class='tmp_cjmp'>74<font class='tmp_other'>08<font class='tmp_cjmp'>40</font> </font><font class='tmp_mov'>mov<font class='tmp_reg'> esi</font>,<font class='tmp_b0xff'><font class='tmp_b0xff'> <font class='tmp_push'>0x40087468</font></font> <font class='tmp_comment'>; 0x40087468 </font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> | | </font><font class='tmp_offset'>0x0000283d</font> <font class='tmp_cjmp'>30<font class='tmp_other'>c0</font> </font><font class='tmp_math'>xor<font class='tmp_reg'> al</font>,<font class='tmp_b0xff'><font class='tmp_reg'> al</font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> | | </font><font class='tmp_offset'>0x0000283f</font> <font class='tmp_other'>e8<font class='tmp_other'>82<font class='tmp_cjmp'>31<font class='tmp_b0x00'>00<font class='tmp_b0x00'>00</font> </font><font class='tmp_call'>call sym.imp.ioctl</font>
<font class='tmp_fline'>|</font><font class='tmp_b0xff'> </font><font class='tmp_flow'> | | </font> 0x000059c6() ; sym.imp.ioctl</font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> | | </font><font class='tmp_offset'>0x00002844</font> <font class='tmp_other'>83<font class='tmp_other'>f8<font class='tmp_b0xff'>ff</font> </font><font class='tmp_cmp'>cmp<font class='tmp_reg'> eax</font>,<font class='tmp_b0xff'><font class='tmp_b0xff'> <font class='tmp_push'>0xffffffff</font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> ,======< </font><font class='tmp_offset'>0x00002847</font> <font class='tmp_cjmp'>74<font class='tmp_other'>0e</font> </font><font class='tmp_cjmp'>je 0x2857</font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> || | </font><font class='tmp_offset'>0x00002849</font> <font class='tmp_other'>0f<font class='tmp_other'>b7<font class='tmp_cjmp'>45<font class='tmp_other'>d2</font> </font><font class='tmp_other'>movzx<font class='tmp_reg'> eax</font>,<font class='tmp_b0xff'> word<font class='tmp_b0xff'> </font>[<font class='tmp_b0xff'>rbp</font>-<font class='tmp_b0xff'><font class='tmp_push'>0x2e</font>]<font class='tmp_b0xff'></font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> || | </font><font class='tmp_offset'>0x0000284d</font> <font class='tmp_other'>85<font class='tmp_other'>c0</font> </font><font class='tmp_cmp'>test<font class='tmp_reg'> eax</font>,<font class='tmp_b0xff'><font class='tmp_reg'> eax</font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'>,=======< </font><font class='tmp_offset'>0x0000284f</font> <font class='tmp_cjmp'>74<font class='tmp_other'>06</font> </font><font class='tmp_cjmp'>je 0x2857</font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'>||`-----> </font><font class='tmp_offset'>0x00002851</font> <font class='tmp_other'>89<font class='tmp_other'>05<font class='tmp_other'>11<font class='tmp_cjmp'>3e<font class='tmp_b0x00'>00<font class='tmp_b0x00'>00</font> </font><font class='tmp_mov'>mov<font class='tmp_b0xff'> </font>[<font class='tmp_b0xff'>rip</font>+<font class='tmp_b0xff'><font class='tmp_push'>0x3e11</font>]<font class='tmp_b0xff'></font>,<font class='tmp_b0xff'><font class='tmp_reg'> eax</font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'>``------> </font><font class='tmp_offset'>0x00002857</font> <font class='tmp_other'>c7<font class='tmp_other'>05<font class='tmp_cjmp'>7b<font class='tmp_cjmp'>41<font class='tmp_b0x00'>00<font class='tmp_other'>0.</font> </font><font class='tmp_mov'>mov dword<font class='tmp_b0xff'> </font>[<font class='tmp_b0xff'>rip</font>+<font class='tmp_b0xff'><font class='tmp_push'>0x417b</font>]<font class='tmp_b0xff'></font>,<font class='tmp_b0xff'><font class='tmp_b0xff'> <font class='tmp_push'>0x1</font></font> <font class='tmp_comment'>; 0x00000001 </font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> | </font><font class='tmp_offset'>0x00002861</font> <font class='tmp_cjmp'>31<font class='tmp_other'>db</font> </font><font class='tmp_math'>xor<font class='tmp_reg'> ebx</font>,<font class='tmp_b0xff'><font class='tmp_reg'> ebx</font></font>
<font class='tmp_fline'>|</font> <font class='tmp_flow'> | </font><font class='tmp_offset'>0x00002863</font> <font class='tmp_other'>eb<font class='tmp_other'>1f</font> </font><font class='tmp_jmp'>jmp 0x2884</font>
</pre>
</div>
</td>
<td valign=top style='width="15%" height:100%'>
<table id="pickers">
<table>
</td>
</tr>
</table>
<script>
var pr2ui = parent.r2ui;
if (pr2ui !== undefined && pr2ui !== null) r2ui = pr2ui;
r2ui.load_colors();
var props = Object.keys(r2ui.colors);
for (var j in props) {
var prop = props[j].replace('.ec_','');
if (prop == "gui_background") $('.tmp_' + prop).css('background-color', r2ui.colors[props[j]]);
else if (prop == "gui_alt_background") $('.tmp_' + prop).css('background-color', r2ui.colors[props[j]]);
else if (prop == "gui_border") $('.tmp_' + prop).css('border-color', r2ui.colors[props[j]]);
else $('.tmp_' + prop).css('color', r2ui.colors[props[j]]);
}
var defaults = {
showPaletteOnly: true,
hideAfterPaletteSelect:true,
preferredFormat: "hex3",
change: function(color) {
var prop = this.id.replace('_picker','');
if (prop == "gui_background") $('.tmp_' + prop).css('background-color', color);
else if (prop == "gui_alt_background") $('.tmp_' + prop).css('background-color', color);
else if (prop == "gui_border") $('.tmp_' + prop).css('border-color', color);
else $('.tmp_' + prop).css('color', color);
r2.cmd("ec " + prop.replace("gui_", "gui.") + " rgb:" + String(color).replace('#',''));
r2ui.load_colors();
},
palette: [["#000","#030","#060","#090","#0c0","#0f0"],["#003","#033","#063","#093","#0c3","#0f3"],["#006","#036","#066","#096","#0c6","#0f6"],["#009","#039","#069","#099","#0c9","#0f9"],
["#00c","#03c","#06c","#09c","#0cc","#0fc"],["#00f","#03f","#06f","#09f","#0cf","#0ff"],["#300","#330","#360","#390","#3c0","#3f0"],["#303","#333","#363","#393","#3c3","#3f3"],
["#306","#336","#366","#396","#3c6","#3f6"],["#309","#339","#369","#399","#3c9","#3f9"],["#30c","#33c","#36c","#39c","#3cc","#3fc"],["#30f","#33f","#36f","#39f","#3cf","#3ff"],
["#600","#630","#660","#690","#6c0","#6f0"],["#603","#633","#663","#693","#6c3","#6f3"],["#606","#636","#666","#696","#6c6","#6f6"],["#609","#639","#669","#699","#6c9","#6f9"],
["#60c","#63c","#66c","#69c","#6cc","#6fc"],["#60f","#63f","#66f","#69f","#6cf","#6ff"],["#900","#930","#960","#990","#9c0","#9f0"],["#903","#933","#963","#993","#9c3","#9f3"],
["#906","#936","#966","#996","#9c6","#9f6"],["#909","#939","#969","#999","#9c9","#9f9"],["#90c","#93c","#96c","#99c","#9cc","#9fc"],["#90f","#93f","#96f","#99f","#9cf","#9ff"],
["#c00","#c30","#c60","#c90","#cc0","#cf0"],["#c03","#c33","#c63","#c93","#cc3","#cf3"],["#c06","#c36","#c66","#c96","#cc6","#cf6"],["#c09","#c39","#c69","#c99","#cc9","#cf9"],
["#c0c","#c3c","#c6c","#c9c","#ccc","#cfc"],["#c0f","#c3f","#c6f","#c9f","#ccf","#cff"],["#f00","#f30","#f60","#f90","#fc0","#ff0"],["#f03","#f33","#f63","#f93","#fc3","#ff3"],
["#f06","#f36","#f66","#f96","#fc6","#ff6"],["#f09","#f39","#f69","#f99","#fc9","#ff9"],["#f0c","#f3c","#f6c","#f9c","#fcc","#ffc"],["#f0f","#f3f","#f6f","#f9f","#fcf","#fff"]]
};
var props = ['comment', 'fname', 'fline', 'help', 'args', 'flag', 'label', 'flow', 'prompt' , 'offset', 'input' , 'other', 'b0x00' , 'b0x7f' , 'b0xff', 'math', 'bin', 'btext', 'push', 'pop', 'jmp', 'cjmp', 'call', 'nop', 'ret', 'trap', 'swi', 'cmp', 'reg', 'creg', 'num', 'mov', 'gui_background', 'gui_alt_background', 'gui_cflow', 'gui_dataoffset', 'gui_border'];
var rows = "";
for (var i in props) rows += '<tr><td><div class="color_label">' + props[i] + ': </div></td><td><input class="picker" type="text" id="' + props[i] + '_picker"></input></td></tr>';
$('#pickers').html(rows);
for (var i in props) init_picker(props[i]);
function init_picker(prop) {
color = r2ui.colors['.ec_' + prop]
selector = '#' + prop + '_picker';
defaults['color'] = rgb2hex(color);
$(selector).spectrum(defaults);
}
function rgb2hex(rgb){
rgb = rgb.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);
return (rgb && rgb.length === 4) ? "#" +
("0" + parseInt(rgb[1],10).toString(16)).slice(-2) +
("0" + parseInt(rgb[2],10).toString(16)).slice(-2) +
("0" + parseInt(rgb[3],10).toString(16)).slice(-2) : '';
}
</script>
</body>
</html>