Jump to content

HTML Hex Colour Coder


MCi Group

Recommended Posts

There's someone out there actually selling an Excel macro that converts RGB into hex? Good god, I'm working too hard.Any image editing program I've ever used has done that for me, I've never found myself wanting to buy an Excel macro just to do that.Come to think of it, I've never found myself wanting to buy an Excel macro to do anything.

Link to comment
Share on other sites

Actually, digging a little deaper here.The home page for MCi Group is, funnily enough: http://www.mci-maestro.co.ukI would therefore class this as a member advertising their products for profit and given that this is against forum rules, unacceptable.

No direct or indirect advertising or websites, forums, products, services
Link to comment
Share on other sites

Instead of banning the user or removing the post, how about we all just make fun of him instead for marketing an Excel macro.Let's market a tool to convert between binary and hex, and license it out on a per-user basis. I think we should use LISP to write it, and require that they run a LISP interpreter.

Why are they so cheap?The programs shown above are relatively simple, and therefore programming costs are kept down.
int r, g, b;cin >> r >> g >> b;cout << rgb2hex(r, g, b);

That'll be $1 please.What is an "automotive units converter"? Is that like 1 engine = 2.7 seats = 3.8 tires? There are 1.7 windows to the radiator.

Link to comment
Share on other sites

Check it out, you can do it with PHP too:

<?php$r = $_GET['r'];$g = $_GET['g'];$b = $_GET['b'];$r_h = dechex($r);$g_h = dechex($g);$b_h = dechex($b);echo "The HTML color code for ({$r}, {$g}, {$b}) is #{$r_h}{$g_h}{$b_h}.  That'll be \$1 please.";?>

convert.php?r=192&g=0&b=128This is my open source color converter. I'll license it to you for $9.99 per user.

Link to comment
Share on other sites

I'm proud to annouce version 2.0 of the Needlessly Expensive Color Converter. Again, this is open source, and it's only $9.99 per user to use. Feel free to make your own additions! But I get 100% of your profit. Thank you.http://server.tracorp.com/convert.php

<?phpget_form_var("page_mode");get_form_var("r");get_form_var("g");get_form_var("b");get_form_var("html");$status_msg1 = "";$status_msg2 = "";if ($page_mode == "dec-hex"){  $r = intval($r);  $g = intval($g);  $b = intval($;  $status_msg1 = "HTML: #" . str_pad(dechex($r), 2, "0", STR_PAD_LEFT) . str_pad(dechex($g), 2, "0", STR_PAD_LEFT) . str_pad(dechex($, 2, "0", STR_PAD_LEFT) . "<br />";}if ($page_mode == "hex-dec"){  $r_h = substr($html, 0, 2);  $g_h = substr($html, 2, 2);  $b_h = substr($html, 4, 2);  $status_msg2 = "RGB: (" . hexdec($r_h) . ", " . hexdec($g_h) . ", " . hexdec($b_h) . ")<br />";}function get_form_var($vName){  global $$vName;  $$vName = "";  if (isset($_GET[$vName]))    $$vName = $_GET[$vName];  if (isset($_POST[$vName]))    $$vName = $_POST[$vName];}?><html>  <head>    <title>$9.99 Color Converter</title>  </head>  <body>    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">    <input type="hidden" name="page_mode" value="dec-hex" />    <div style="width: 300px; margin: 0 auto; background-color: #D0D0D0; border: 1px solid #A0A0A0; text-align: center;">      <?php echo $status_msg1; ?>      R:<input type="text" name="r" maxlength="3" size="3" value="<?php echo $r; ?>" />      G:<input type="text" name="g" maxlength="3" size="3" value="<?php echo $g; ?>" />      B:<input type="text" name="b" maxlength="3" size="3" value="<?php echo $b; ?>" />      <br />      <input type="submit" value="Do it now!" />    </div>    </form>    <br />    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post">    <input type="hidden" name="page_mode" value="hex-dec" />    <div style="width: 300px; margin: 0 auto; background-color: #D0D0D0; border: 1px solid #A0A0A0; text-align: center;">      <?php echo $status_msg2; ?>      HTML: #<input type="text" name="html" maxlength="6" size="6" value="<?php echo $html; ?>" />      <br />      <input type="submit" value="Do it now!" />    </div>    </form>  </body></html>

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...