Converting RGB values to HEX


Posted on 16th Feb 2014 07:03 pm by admin

Code: <?PHP

$file_handle = fopen("colors/rgb.csv", "r");

Did you know?Explore Trending and Topic pages for more stories like this.
while (!feof($file_handle) ) {

$line_of_text = fgetcsv($file_handle, 1024);

print $line_of_text[2] . $line_of_text[3] . $line_of_text[4] . "<BR>";

}

fclose($file_handle);

?>
my code above currently outputs a list of RGB numbers for example:

Ref_RRef_GRef_B
149119109
190171158
200161148
154109111
1088888
1408579

I would like to now convert these numbers (each line) to HEX colors

please help?!

thanks
No comments posted yet

Your Answer:

Login to answer
75 Like 32 Dislike
Previous forums Next forums
Other forums

Class not found error
I am getting Class 'index' not found in Eval function:

//write config

$pat

Printer configuration
Hi All,
Suppose one of the user deleted the printer settings unfortunatly ,then what is the pro

php problem?
I don't think I'm stupid, but maybe I am.

I am working on a sit for a friend I am try to put

Reditecting pages based on logic
Newbie here, apologies in advance!

I am trying to use the header function to forward one of a

noob question
i traying to do a php form with auto replay for both(me and the user who send me a mail),

a u

COOIS - Saving Object Overview WIP Status layouts
COOIS - Would like to be able to save the layout of an Object Overview - WIP Status report. There i

Binding 2 UDP sockets on same port, connected to different destinations, 1 receives
Hello,
My application wants to send/recv data to 2 different UDP ports on a remote computer, us

need to apply an if/else statement to Tim Thumb script
Not sure how to work this. I essentially want to call a variety of image sizes based on which style

i need help with php header and footer
I have designed a header and footer for my site and they seem to be ok when they are running individ

this code is not working????
it says this error.. Warning: Division by zero in ..

the variables are correct, so why is th

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash