Thanks for the info. You are right, the Spanish of French version have
tables that are easier to understand. No need to know Spanish of French
Rafael
El 06/09/2013 19:16, Gérard Lochon escribió:
----- Original Message ----- From: "Rafael Copquin"
<[email protected]>
To: <[email protected]>
Sent: Wednesday, September 04, 2013 8:49 PM
Subject: color codes
I need to create a table with color codes.
I wonder how are the numbers obtained. I do not want to use the RGB
function and I saw somewhere an algorithm or a function that gives
those numbers.
How?
Rafael Copquin
Hello Rafael.
The color_number and rgb(red,green,blue) values are related :
if you concatenate the hexadecimal values of the red, green and blue
components,
the result is the hexadecimal value of the color_number.
Color number => rgb() :
red = BITAND(0xff,color_number)
green = BITAND(0xff,BITRSHIFT(color_number,8))
blue = BITAND(0xff,BITRSHIFT(color_number,16))
Rgb() => color number :
color_number = BITOR(red,BITLSHIFT(green,8),BITLSHIFT(blue,16))
You can find the different values here :
http://en.wikipedia.org/wiki/List_of_colors_%28compact%29
(better use in spanish or french pages)
Gérard.
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.