My first send of this question didn't seem to go through.
What is the formula for calculating a hex color value such as FFCC00 into
the RGB equivalents?
TIA
Jerry
lncolor = rgb(0xff,0xcc,0x00)
Wilson
-----Original Message-----
From: profox-admin@leafe.com [mailto:profox-admin@leafe.com]On Behalf Of
jkott
Sent: Thursday, January 16, 2003 1:19 PM
To: profox@leafe.com
Subject: Color Codes
My first send of this question didn't seem to go through.
What is the formula for calculating a hex color value such as FFCC00 into
the RGB equivalents?
TIA
Jerry
[excessive quoting removed by server]
I need to create a table with color codes.
From the file FOXPRO.H I got this:
*-- Properties
*-- Colors
#DEFINE COLOR_WHITE 16777215
#DEFINE COLOR_BLACK 0
#DEFINE COLOR_GRAY 12632256
#DEFINE COLOR_DARK_GRAY 8421504
#DEFINE COLOR_RED 255
#DEFINE COLOR_DARK_BLUE 8388608
#DEFINE COLOR_CYAN 16776960
#DEFINE COLOR_DARK_CYAN 8421376
#DEFINE COLOR_GREEN 65280
#DEFINE COLOR_DARK_GREEN 32768
#DEFINE COLOR_YELLOW 65535
#DEFINE COLOR_DARK_YELLOW 32896
#DEFINE COLOR_BLUE 16711680
#DEFINE COLOR_DARK_RED 128
#DEFINE COLOR_MAGENTA 16711935
#DEFINE COLOR_DARK_MAGENTA 8388736
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
_______________________________________________
Post Messages to: ProFox@leafe.com
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/522780C3.6050404@fibertel.com.ar
** 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.
may be this can help you :
|m.nRed = *Bitand*(0xFF, m.nRGB)
m.nGreen = *Bitand*(0xFF, *Bitrshift*(m.nRGB,8))
m.nBlue = *Bitand*(0xFF, *Bitrshift*(m.nRGB,16))
|The Foxil
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: ProFox@leafe.com
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/522783F2.3040305@wanadoo.fr
** 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.
lnColor = getcolor()
?lnColor
On 9/4/2013 11:49 AM, Rafael Copquin wrote:
> I need to create a table with color codes.
>
> From the file FOXPRO.H I got this:
>
> *-- Properties
> *-- Colors
> #DEFINE COLOR_WHITE 16777215
> #DEFINE COLOR_BLACK 0
> #DEFINE COLOR_GRAY 12632256
> #DEFINE COLOR_DARK_GRAY 8421504
> #DEFINE COLOR_RED 255
> #DEFINE COLOR_DARK_BLUE 8388608
> #DEFINE COLOR_CYAN 16776960
> #DEFINE COLOR_DARK_CYAN 8421376
> #DEFINE COLOR_GREEN 65280
> #DEFINE COLOR_DARK_GREEN 32768
> #DEFINE COLOR_YELLOW 65535
> #DEFINE COLOR_DARK_YELLOW 32896
> #DEFINE COLOR_BLUE 16711680
> #DEFINE COLOR_DARK_RED 128
> #DEFINE COLOR_MAGENTA 16711935
> #DEFINE COLOR_DARK_MAGENTA 8388736
>
>
> 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
>
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
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/5227843E.5090903@gmail.com
** 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.
I've got it, it's the getcolor() functions
Thanks
Rafael Copquin
El 04/09/2013 15:49, Rafael Copquin escribió:
> I need to create a table with color codes.
>
> From the file FOXPRO.H I got this:
>
> *-- Properties
> *-- Colors
> #DEFINE COLOR_WHITE 16777215
> #DEFINE COLOR_BLACK 0
> #DEFINE COLOR_GRAY 12632256
> #DEFINE COLOR_DARK_GRAY 8421504
> #DEFINE COLOR_RED 255
> #DEFINE COLOR_DARK_BLUE 8388608
> #DEFINE COLOR_CYAN 16776960
> #DEFINE COLOR_DARK_CYAN 8421376
> #DEFINE COLOR_GREEN 65280
> #DEFINE COLOR_DARK_GREEN 32768
> #DEFINE COLOR_YELLOW 65535
> #DEFINE COLOR_DARK_YELLOW 32896
> #DEFINE COLOR_BLUE 16711680
> #DEFINE COLOR_DARK_RED 128
> #DEFINE COLOR_MAGENTA 16711935
> #DEFINE COLOR_DARK_MAGENTA 8388736
>
>
> 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
>
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
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/5227846A.4010908@fibertel.com.ar
** 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.
I just answered my own question, please see my next post
Merci beaucoup
Rafael
El 04/09/2013 16:03, Jean MAURICE escribió:
> may be this can help you :
>
>
> |m.nRed = *Bitand*(0xFF, m.nRGB)
> m.nGreen = *Bitand*(0xFF, *Bitrshift*(m.nRGB,8))
> m.nBlue = *Bitand*(0xFF, *Bitrshift*(m.nRGB,16))
>
> |The Foxil
>
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
> text/plain (text body -- kept)
> text/html
> ---
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
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/522784AC.2000507@fibertel.com.ar
** 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.
A psychic lol
Al
-----Original Message-----
From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Rafael
Copquin
Sent: 04 September 2013 21:06
To: profoxtech@leafe.com
Subject: Re: color codes
I just answered my own question, please see my next post
Merci beaucoup
Rafael
_______________________________________________
Post Messages to: ProFox@leafe.com
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/005701cea9a2$2dff3860$89fda920$@com
** 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.
----- Original Message -----
From: "Rafael Copquin" <rcopquin@fibertel.com.ar>
To: <profoxtech@leafe.com>
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.
_______________________________________________
Post Messages to: ProFox@leafe.com
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/89533FA9E0AE4EC88ACF6CA7456486A7@MuriellePC
** 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.
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"
> <rcopquin@fibertel.com.ar>
> To: <profoxtech@leafe.com>
> 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: ProFox@leafe.com
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/522AF543.5070205@fibertel.com.ar
** 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.