Top

RGB triplet to hex triplet converter


mIRC Code
+ 0 likes
Please Register to submit score.
Average Score  0.0
Scores Submitted  0
Date Added  Mar 21, 2007
Last Updated  Mar 22, 2007
Tags  color  converter  hex  rgb 
  Bookmark and Share

Introduction

What it does: This script converts an RGB triplet (the red, blue, and green values of a color, and example would be 43,126,230) into a hex triplet (such as 2b7ee6.) I do acknowledge the fact that using $base($rgb($3,$2,$1),10,16) would have allowed me to cut 8 lines from the script, but I didn't want to use that.

To use: $hex(R,G,B), where R, G, and B are between 0 and 255.
I.E. //echo -a $hex(43,126,230) would echo to the active channel: 2b7ee6.

Grab the Code

Comments

  (0)  RSS

Please Register or Login to start posting comments.
Bottom