473,695 Members | 1,685 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Anyone have a list of HTML colors in Hex, Long and Named format?

I'm using an Access database to drive a web site and the
colors of various table backgrounds are stored in Access.
I want users of the Access database to be able to select
colors for the site, but my mappings between named colors,
HEX values and the Long Integer values used in Access are
not jibbing. Anyone have a nice list laying around?

Danny J Lesandrini
dl*********@hot mail.com
Nov 13 '05 #1
6 6150
Danny I have seen such a table on the MS Office site before but I cannot
find it right now.
Here's one from a Web site I had archived:
http://www.geocities.com/SiliconValley/Network/2397/

Here's an HTML "SAFE" color chart.
http://support.microsoft.com/default...b;en-us;304335
And the 16 safe NAMED color values:
http://support.microsoft.com/kb/295546/EN-US/

There's lots of code out there showing how to convert from one format to
another. I have code in several projects to do this as well. Is there a
particular format conversion that is causing you trouble?
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Danny Lesandrini" <da******@comca st.net> wrote in message
news:11******** *************** ***@posting.goo gle.com...
I'm using an Access database to drive a web site and the
colors of various table backgrounds are stored in Access.
I want users of the Access database to be able to select
colors for the site, but my mappings between named colors,
HEX values and the Long Integer values used in Access are
not jibbing. Anyone have a nice list laying around?

Danny J Lesandrini
dl*********@hot mail.com


Nov 13 '05 #2
Stephen, thanks for the reply. Been a long time since we chatted here.

I'm still having a problem getting the color to display from Access, as the
back color of a text box where it serves as a color sample. I ended up
using
code that looks like this ... and it sort of works, but the colors come out
wrong sometimes.

Me.boxHead.Back Color = "&H" & Me.txtHead

I found the "&H" reference searching Google, though I must admit I don't
know why it's there. I also tried a different routine for converting the
HEX
to a LONG, but that yielded the same results.

Anyone know how I can convert these HEX values to LONG?

HTM ID ColorName
--------- -------------
000000 black
000080 navy
0000FF blue
008000 green
008080 teal
00FF00 lime
00FFFF aqua
800000 maroon
800080 purple
808000 olive
808080 gray
C0C0C0 silver
FF0000 red
FF00FF fuchsia
FFFF00 yellow
FFFFFF white
"Stephen Lebans" <Fo************ *************** *************@l invalid.com>
wrote in message news:sT******** **************@ ursa-nb00s0.nbnet.nb .ca...
Danny I have seen such a table on the MS Office site before but I cannot
find it right now.
Here's one from a Web site I had archived:
http://www.geocities.com/SiliconValley/Network/2397/

Here's an HTML "SAFE" color chart.
http://support.microsoft.com/default...b;en-us;304335
And the 16 safe NAMED color values:
http://support.microsoft.com/kb/295546/EN-US/

There's lots of code out there showing how to convert from one format to
another. I have code in several projects to do this as well. Is there a
particular format conversion that is causing you trouble?
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Danny Lesandrini" <da******@comca st.net> wrote in message
news:11******** *************** ***@posting.goo gle.com...
I'm using an Access database to drive a web site and the
colors of various table backgrounds are stored in Access.
I want users of the Access database to be able to select
colors for the site, but my mappings between named colors,
HEX values and the Long Integer values used in Access are
not jibbing. Anyone have a nice list laying around?

Danny J Lesandrini
dl*********@hot mail.com

Nov 13 '05 #3
Ok, I found a really, really weird thing that is causing my issue. When
I convert blue and red, the LONG conversion from HEX doesn't give
me the correct VBA Color, as described, for example, with the VBA
color constants. They are reversed for Red and Blue.

0000FF blue ... cLng("&H0000FF" ) = 255
FF0000 red ... cLng("&HFF0000" ) = 16711680

vbBlue = 16711680
vbRed = 255

What's up with that?
"Stephen Lebans" <Fo************ *************** *************@l invalid.com>
wrote in message news:sT******** **************@ ursa-nb00s0.nbnet.nb .ca...
Danny I have seen such a table on the MS Office site before but I cannot
find it right now.
Here's one from a Web site I had archived:
http://www.geocities.com/SiliconValley/Network/2397/

Here's an HTML "SAFE" color chart.
http://support.microsoft.com/default...b;en-us;304335
And the 16 safe NAMED color values:
http://support.microsoft.com/kb/295546/EN-US/

There's lots of code out there showing how to convert from one format to
another. I have code in several projects to do this as well. Is there a
particular format conversion that is causing you trouble?
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Danny Lesandrini" <da******@comca st.net> wrote in message
news:11******** *************** ***@posting.goo gle.com...
I'm using an Access database to drive a web site and the
colors of various table backgrounds are stored in Access.
I want users of the Access database to be able to select
colors for the site, but my mappings between named colors,
HEX values and the Long Integer values used in Access are
not jibbing. Anyone have a nice list laying around?

Danny J Lesandrini
dl*********@hot mail.com

Nov 13 '05 #4
"Danny J. Lesandrini" <dl*********@ho tmail.com> wrote in news:pIOdncoJU-j-
wA********@comc ast.com:
Ok, I found a really, really weird thing that is causing my issue. When
I convert blue and red, the LONG conversion from HEX doesn't give
me the correct VBA Color, as described, for example, with the VBA
color constants. They are reversed for Red and Blue.

0000FF blue ... cLng("&H0000FF" ) = 255
FF0000 red ... cLng("&HFF0000" ) = 16711680

vbBlue = 16711680
vbRed = 255

What's up with that?
"Stephen Lebans" <ForEmailGotoMy .WebSite.- WW************* ***@linvalid.co m> wrote in message news:sT******** **************@ ursa-nb00s0.nbnet.nb .ca...
Danny I have seen such a table on the MS Office site before but I cannot
find it right now.
Here's one from a Web site I had archived:
http://www.geocities.com/SiliconValley/Network/2397/

Here's an HTML "SAFE" color chart.
http://support.microsoft.com/default...b;en-us;304335
And the 16 safe NAMED color values:
http://support.microsoft.com/kb/295546/EN-US/

There's lots of code out there showing how to convert from one format to
another. I have code in several projects to do this as well. Is there a
particular format conversion that is causing you trouble?
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Danny Lesandrini" <da******@comca st.net> wrote in message
news:11******** *************** ***@posting.goo gle.com...
I'm using an Access database to drive a web site and the
colors of various table backgrounds are stored in Access.
I want users of the Access database to be able to select
colors for the site, but my mappings between named colors,
HEX values and the Long Integer values used in Access are
not jibbing. Anyone have a nice list laying around?

Danny J Lesandrini
dl*********@hot mail.com


Maybe this is pertinent; maybe not.

Sub test()
Const LightBlue As Long = 16763904
Dim aStrings As Variant
aStrings = ColorStrings(Li ghtBlue)
Debug.Print "RGB String: " & aStrings(0)
' RGB String: 0,204,255
Debug.Print "HTML Color Code: " & aStrings(1)
' HTML Color Code: 00CCFF
End Sub

Function ColorStrings(By Val lngColor As Long) As Variant
Dim aStrings(0 To 1) As String
Dim bytRed As Byte
Dim bytGreen As Byte
Dim bytBlue As Byte
bytRed = lngColor And 2 ^ 8 - 1
bytGreen = (lngColor And 2 ^ 16 - 1) \ (2 ^ 8)
bytBlue = (lngColor And 2 ^ 24 - 1) \ (2 ^ 16)
aStrings(0) = CStr(bytRed) & "," & CStr(bytGreen) & "," & CStr
((bytBlue))
aStrings(1) = Right("00" & Hex(bytRed), 2) & Right("00" & Hex
(bytGreen), 2) & Right("00" & Hex(bytBlue), 2)
ColorStrings = aStrings
End Function

--
Lyle
--
use iso date format: yyyy-mm-dd
http://www.w3.org/QA/Tips/iso-date
--
The e-mail address isn't, but you could use it to find one.
Nov 13 '05 #5
WIth HTML color HEX strings the format is RGB. With a standard Long
value(VB) the bytes are ordered BGR and the upper most byte is not used
or left for Transparency etc.
There's lots of code out there showing how to extract the componenet R,
G and B bytes values from a Long in VB.

Here's a method from Randy:
From: Randy Birch (rg*@mvps.org)
Subject: Re: Red, Green and Blue values from a RGB value?

Private Sub GetRBGFromCLRRE F(ByVal clrref As Long, r As Long, g As Long,
b
As Long)

'pass a hex colour, return the rgb components

b = (clrref \ 65536) And &HFF
g = (clrref \ 256) And &HFF
r = clrref And &HFF
End Sub


Here is a previous post of mine on this subject.
For a detailed online Color FAQ see:
http://www.inforamp.net/~poynton/Poynton-color.html
Specifically:
http://www.inforamp.net/~poynton/ColorFAQ.html
For information on how windows represents colors see:
http://msdn.microsoft.com/library/de.../en-us/gdi/col
ors_87zn.asp

In case you do not have access to MSDN:

Working with Color
See Also

Visual Basic uses a consistent system for all color properties and
graphics methods. A color is represented by a Long integer, and this
value has the same meaning in all contexts that specify a color.

Specifying Colors at Run Time
There are four ways to specify a color value at run time:

Use the RGB function.
Use the QBColor function to choose one of 16 Microsoft QuickBasic®
colors.
Use one of the intrinsic constants listed in the Object Browser.
Enter a color value directly.
This section discusses how to use the RGB and QBColor functions as
simple ways to specify color. See "Using Color Properties" later in this
chapter for information on using constants to define color or directly
entering color values.

Using the RGB Function
You can use the RGB function to specify any color.

To use the RGB function to specify a color

Assign each of the three primary colors (red, green, and blue) a number
from 0 to 255, with 0 denoting the least intensity and 255 the greatest.
Give these three numbers as input to the RGB function, using the order
red-green-blue.
Assign the result to the color property or color argument.
Every visible color can be produced by combining one or more of the
three primary colors. For example:

' Set background to green.
Form1.BackColor = RGB(0, 128, 0)
' Set background to yellow.
Form2.BackColor = RGB(255, 255, 0)
' Set point to dark blue.
PSet (100, 100), RGB(0, 0, 64)

For More Information For information on the RGB function, see "RGB
Function" in the Language Reference.

Using Color Properties
See Also

Many of the controls in Visual Basic have properties that determine the
colors used to display the control. Keep in mind that some of these
properties also apply to controls that aren't graphical. The following
table describes the color properties.

Property Description
BackColor Sets the background color of the form or control used for
drawing. If you change the BackColor property after using graphics
methods to draw, the graphics are erased by the new background color.
ForeColor Sets the color used by graphics methods to create text or
graphics in a form or control. Changing ForeColor does not affect text
or graphics already created.
BorderColor Sets the color of the border of a shape control.
FillColor Sets the color that fills circles created with the Circle
method and boxes created with the Line method.
For More Information For detailed descriptions of these color
properties, see "BackColor Property," "ForeColor Property," "BorderColo r
Property," and "FillColor Property" in the Language Reference.

Defining Colors
The color properties can use any of several methods to define the color
value. The RGB function described in "Working with Color" is one way to
define colors. This section discusses two more ways to define colors:

Using defined constants
Using direct color settings
Using Defined Constants
You don't need to understand how color values are generated if you use
the intrinsic constants listed in the Object Browser. In addition,
intrinsic constants do not need to be declared. For example, you can use
the constant vbRed whenever you want to specify red as a color argument
or color property setting:

BackColor = vbRed

Using Direct Color Settings
Using the RGB function or the intrinsic constants to define color are in
direct methods. They are indirect because Visual Basic interprets them
into the single approach it uses to represent color. If you understand
how colors are represented in Visual Basic, you can assign numbers to
color properties and arguments that specify color directly. In most
cases, it's much easier to enter these numbers in hexadecimal.

The valid range for a normal RGB color is 0 to 16,777,215 (&HFFFFFF&).
Each color setting (property or argument) is a 4-byte integer. The high
byte of a number in this range equals 0. The lower 3 bytes, from least
to most significant byte, determine the amount of red, green, and blue,
respectively. The red, green, and blue components are each represented
by a number between 0 and 255 (&HFF).

Consequently, you can specify a color as a hexadecimal number using this
syntax:

&HBBGGRR&

The BB specifies the amount of blue, GG the amount of green, and RR the
amount of red. Each of these fragments is a two-digit hexadecimal number
from 00 to FF. The median value is 80. Thus, the following number
specifies gray, which has the median amount of all three colors:

&H808080&

Setting the most significant bit to 1 changes the meaning of the color
value: It no longer represents an RGB color, but an environment-wide
color specified through the Windows Control Panel. The values that
correspond to these system-wide colors range from &H80000000 to
&H80000015.

Note Although you can specify over 16 million different colors, not
all systems are capable of displaying them accurately. For more
information on how Windows represents colors, see "Working with 256
Colors" later in this chapter.

Using System Colors
When setting the colors of controls or forms in your application, you
can use colors specified by the operating system instead of specific
color values. If you specify system colors, when users of your
application change the values of system colors on their computers, your
application automatically reflects the user-specified color values.

Each system color has both a defined constant and a direct color
setting. The high byte of direct color settings for system colors
differs from those of normal RGB colors. For RGB colors, the high byte
equals 0 whereas for system colors the high byte equals 8. The rest of
the number refers to a particular system color. For example, the
hexadecimal number used to represent the color of an active window
caption is &H80000002&.

When you select color properties at design time with the Properties
window, selecting the System tab lets you choose system settings, which
are automatically converted into the hexadecimal value. You can also
find the defined constants for system colors in the Object Browser.

Constant Value Description
vbScrollBars 0x80000000 Scroll bar color
vbDesktop 0x80000001 Desktop color
vbActiveTitleBa r 0x80000002 Color of the title bar for the active window
vbInactiveTitle Bar 0x80000003 Color of the title bar for the inactive
window
vbMenuBar 0x80000004 Menu background color
vbWindowBackgro und 0x80000005 Window background color
vbWindowFrame 0x80000006 Window frame color
vbMenuText 0x80000007 Color of text on menus
vbWindowText 0x80000008 Color of text in windows
vbTitleBarText 0x80000009 Color of text in caption, size box, and scroll
arrow
vbActiveBorder 0x8000000A Border color of active window
vbInactiveBorde r 0x8000000B Border color of inactive window
vbApplicationWo rkspace 0x8000000C Background color of multiple-document
interface (MDI) applications
vbHighlight 0x8000000D Background color of items selected in a control
vbHighlightText 0x8000000E Text color of items selected in a control
vbButtonFace 0x8000000F Color of shading on the face of command buttons
vbButtonShadow 0x80000010 Color of shading on the edge of command
buttons
vbGrayText 0x80000011 Grayed (disabled) text
vbButtonText 0x80000012 Text color on push buttons
vbInactiveCapti onText 0x80000013 Color of text in an inactive caption
vb3DHighlight 0x80000014 Highlight color for 3-D display elements
vb3DDKShadow 0x80000015 Darkest shadow color for 3-D display elements
vb3DLight 0x80000016 Second lightest 3-D color after vb3DHighlight
vbInfoText 0x80000017 Color of text in ToolTips
vbInfoBackgroun d 0x80000018 Background color of ToolTips

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Danny J. Lesandrini" <dl*********@ho tmail.com> wrote in message
news:pI******** ************@co mcast.com...
Ok, I found a really, really weird thing that is causing my issue. When I convert blue and red, the LONG conversion from HEX doesn't give
me the correct VBA Color, as described, for example, with the VBA
color constants. They are reversed for Red and Blue.

0000FF blue ... cLng("&H0000FF" ) = 255
FF0000 red ... cLng("&HFF0000" ) = 16711680

vbBlue = 16711680
vbRed = 255

What's up with that?
"Stephen Lebans" <Fo************ *************** *************@l invalid.com> wrote in message

news:sT******** **************@ ursa-nb00s0.nbnet.nb .ca...
Danny I have seen such a table on the MS Office site before but I cannot find it right now.
Here's one from a Web site I had archived:
http://www.geocities.com/SiliconValley/Network/2397/

Here's an HTML "SAFE" color chart.
http://support.microsoft.com/default...b;en-us;304335
And the 16 safe NAMED color values:
http://support.microsoft.com/kb/295546/EN-US/

There's lots of code out there showing how to convert from one format to another. I have code in several projects to do this as well. Is there a particular format conversion that is causing you trouble?
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Danny Lesandrini" <da******@comca st.net> wrote in message
news:11******** *************** ***@posting.goo gle.com...
I'm using an Access database to drive a web site and the
colors of various table backgrounds are stored in Access.
I want users of the Access database to be able to select
colors for the site, but my mappings between named colors,
HEX values and the Long Integer values used in Access are
not jibbing. Anyone have a nice list laying around?

Danny J Lesandrini
dl*********@hot mail.com



Nov 13 '05 #6
Thanks ... that makes sense now.
"Stephen Lebans" <Fo************ *************** *************@l invalid.com>
wrote in message news:N5******** **************@ ursa-nb00s0.nbnet.nb .ca...
WIth HTML color HEX strings the format is RGB. With a standard Long
value(VB) the bytes are ordered BGR and the upper most byte is not used
or left for Transparency etc.
There's lots of code out there showing how to extract the componenet R,
G and B bytes values from a Long in VB.

Here's a method from Randy:
From: Randy Birch (rg*@mvps.org)
Subject: Re: Red, Green and Blue values from a RGB value?

Private Sub GetRBGFromCLRRE F(ByVal clrref As Long, r As Long, g As Long,
b
As Long)

'pass a hex colour, return the rgb components

b = (clrref \ 65536) And &HFF
g = (clrref \ 256) And &HFF
r = clrref And &HFF
End Sub


Here is a previous post of mine on this subject.
For a detailed online Color FAQ see:
http://www.inforamp.net/~poynton/Poynton-color.html
Specifically:
http://www.inforamp.net/~poynton/ColorFAQ.html
For information on how windows represents colors see:
http://msdn.microsoft.com/library/de.../en-us/gdi/col
ors_87zn.asp

In case you do not have access to MSDN:

Working with Color
See Also

Visual Basic uses a consistent system for all color properties and
graphics methods. A color is represented by a Long integer, and this
value has the same meaning in all contexts that specify a color.

Specifying Colors at Run Time
There are four ways to specify a color value at run time:

Use the RGB function.
Use the QBColor function to choose one of 16 Microsoft QuickBasic®
colors.
Use one of the intrinsic constants listed in the Object Browser.
Enter a color value directly.
This section discusses how to use the RGB and QBColor functions as
simple ways to specify color. See "Using Color Properties" later in this
chapter for information on using constants to define color or directly
entering color values.

Using the RGB Function
You can use the RGB function to specify any color.

To use the RGB function to specify a color

Assign each of the three primary colors (red, green, and blue) a number
from 0 to 255, with 0 denoting the least intensity and 255 the greatest.
Give these three numbers as input to the RGB function, using the order
red-green-blue.
Assign the result to the color property or color argument.
Every visible color can be produced by combining one or more of the
three primary colors. For example:

' Set background to green.
Form1.BackColor = RGB(0, 128, 0)
' Set background to yellow.
Form2.BackColor = RGB(255, 255, 0)
' Set point to dark blue.
PSet (100, 100), RGB(0, 0, 64)

For More Information For information on the RGB function, see "RGB
Function" in the Language Reference.

Using Color Properties
See Also

Many of the controls in Visual Basic have properties that determine the
colors used to display the control. Keep in mind that some of these
properties also apply to controls that aren't graphical. The following
table describes the color properties.

Property Description
BackColor Sets the background color of the form or control used for
drawing. If you change the BackColor property after using graphics
methods to draw, the graphics are erased by the new background color.
ForeColor Sets the color used by graphics methods to create text or
graphics in a form or control. Changing ForeColor does not affect text
or graphics already created.
BorderColor Sets the color of the border of a shape control.
FillColor Sets the color that fills circles created with the Circle
method and boxes created with the Line method.
For More Information For detailed descriptions of these color
properties, see "BackColor Property," "ForeColor Property," "BorderColo r
Property," and "FillColor Property" in the Language Reference.

Defining Colors
The color properties can use any of several methods to define the color
value. The RGB function described in "Working with Color" is one way to
define colors. This section discusses two more ways to define colors:

Using defined constants
Using direct color settings
Using Defined Constants
You don't need to understand how color values are generated if you use
the intrinsic constants listed in the Object Browser. In addition,
intrinsic constants do not need to be declared. For example, you can use
the constant vbRed whenever you want to specify red as a color argument
or color property setting:

BackColor = vbRed

Using Direct Color Settings
Using the RGB function or the intrinsic constants to define color are in
direct methods. They are indirect because Visual Basic interprets them
into the single approach it uses to represent color. If you understand
how colors are represented in Visual Basic, you can assign numbers to
color properties and arguments that specify color directly. In most
cases, it's much easier to enter these numbers in hexadecimal.

The valid range for a normal RGB color is 0 to 16,777,215 (&HFFFFFF&).
Each color setting (property or argument) is a 4-byte integer. The high
byte of a number in this range equals 0. The lower 3 bytes, from least
to most significant byte, determine the amount of red, green, and blue,
respectively. The red, green, and blue components are each represented
by a number between 0 and 255 (&HFF).

Consequently, you can specify a color as a hexadecimal number using this
syntax:

&HBBGGRR&

The BB specifies the amount of blue, GG the amount of green, and RR the
amount of red. Each of these fragments is a two-digit hexadecimal number
from 00 to FF. The median value is 80. Thus, the following number
specifies gray, which has the median amount of all three colors:

&H808080&

Setting the most significant bit to 1 changes the meaning of the color
value: It no longer represents an RGB color, but an environment-wide
color specified through the Windows Control Panel. The values that
correspond to these system-wide colors range from &H80000000 to
&H80000015.

Note Although you can specify over 16 million different colors, not
all systems are capable of displaying them accurately. For more
information on how Windows represents colors, see "Working with 256
Colors" later in this chapter.

Using System Colors
When setting the colors of controls or forms in your application, you
can use colors specified by the operating system instead of specific
color values. If you specify system colors, when users of your
application change the values of system colors on their computers, your
application automatically reflects the user-specified color values.

Each system color has both a defined constant and a direct color
setting. The high byte of direct color settings for system colors
differs from those of normal RGB colors. For RGB colors, the high byte
equals 0 whereas for system colors the high byte equals 8. The rest of
the number refers to a particular system color. For example, the
hexadecimal number used to represent the color of an active window
caption is &H80000002&.

When you select color properties at design time with the Properties
window, selecting the System tab lets you choose system settings, which
are automatically converted into the hexadecimal value. You can also
find the defined constants for system colors in the Object Browser.

Constant Value Description
vbScrollBars 0x80000000 Scroll bar color
vbDesktop 0x80000001 Desktop color
vbActiveTitleBa r 0x80000002 Color of the title bar for the active window
vbInactiveTitle Bar 0x80000003 Color of the title bar for the inactive
window
vbMenuBar 0x80000004 Menu background color
vbWindowBackgro und 0x80000005 Window background color
vbWindowFrame 0x80000006 Window frame color
vbMenuText 0x80000007 Color of text on menus
vbWindowText 0x80000008 Color of text in windows
vbTitleBarText 0x80000009 Color of text in caption, size box, and scroll
arrow
vbActiveBorder 0x8000000A Border color of active window
vbInactiveBorde r 0x8000000B Border color of inactive window
vbApplicationWo rkspace 0x8000000C Background color of multiple-document
interface (MDI) applications
vbHighlight 0x8000000D Background color of items selected in a control
vbHighlightText 0x8000000E Text color of items selected in a control
vbButtonFace 0x8000000F Color of shading on the face of command buttons
vbButtonShadow 0x80000010 Color of shading on the edge of command
buttons
vbGrayText 0x80000011 Grayed (disabled) text
vbButtonText 0x80000012 Text color on push buttons
vbInactiveCapti onText 0x80000013 Color of text in an inactive caption
vb3DHighlight 0x80000014 Highlight color for 3-D display elements
vb3DDKShadow 0x80000015 Darkest shadow color for 3-D display elements
vb3DLight 0x80000016 Second lightest 3-D color after vb3DHighlight
vbInfoText 0x80000017 Color of text in ToolTips
vbInfoBackgroun d 0x80000018 Background color of ToolTips

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"Danny J. Lesandrini" <dl*********@ho tmail.com> wrote in message
news:pI******** ************@co mcast.com...
Ok, I found a really, really weird thing that is causing my issue.

When
I convert blue and red, the LONG conversion from HEX doesn't give
me the correct VBA Color, as described, for example, with the VBA
color constants. They are reversed for Red and Blue.

0000FF blue ... cLng("&H0000FF" ) = 255
FF0000 red ... cLng("&HFF0000" ) = 16711680

vbBlue = 16711680
vbRed = 255

What's up with that?
"Stephen Lebans"

<Fo************ *************** *************@l invalid.com>
wrote in message

news:sT******** **************@ ursa-nb00s0.nbnet.nb .ca...
> Danny I have seen such a table on the MS Office site before but I cannot > find it right now.
> Here's one from a Web site I had archived:
> http://www.geocities.com/SiliconValley/Network/2397/
>
> Here's an HTML "SAFE" color chart.
> http://support.microsoft.com/default...b;en-us;304335
> And the 16 safe NAMED color values:
> http://support.microsoft.com/kb/295546/EN-US/
>
> There's lots of code out there showing how to convert from one format to > another. I have code in several projects to do this as well. Is there a > particular format conversion that is causing you trouble?
> --
>
> HTH
> Stephen Lebans
> http://www.lebans.com
> Access Code, Tips and Tricks
> Please respond only to the newsgroups so everyone can benefit.
>
>
> "Danny Lesandrini" <da******@comca st.net> wrote in message
> news:11******** *************** ***@posting.goo gle.com...
>> I'm using an Access database to drive a web site and the
>> colors of various table backgrounds are stored in Access.
>> I want users of the Access database to be able to select
>> colors for the site, but my mappings between named colors,
>> HEX values and the Long Integer values used in Access are
>> not jibbing. Anyone have a nice list laying around?
>>
>> Danny J Lesandrini
>> dl*********@hot mail.com
>


Nov 13 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1479
by: Frank Mikkelsen | last post by:
Hello group I am looking for a function written in standard C witch can perform the a * b / c on a long int without loosing any bits. a * b can exceed 32 bits and if I carst a,b and c to floats I will still loos precision on the last bits. My compiler only supports 4 byte long int and 4 byte float hope someone can help me Frank
2
1258
by: Tina | last post by:
how can I find out the name of the html color #COFFFF. More specifically I need to find a way in code to convert any html color to the english name. ColorTranslator doesn't seem to do it. Thanks, T
3
4140
by: mike | last post by:
Hi all, I am using StreamWriter class to save string var into html file but somehow when I open the html file all formats are lost. I want to keep all formats(spaces, newline and so on)For example, I have sFunc in below format(newline, spaces ...) ----------sFunc ---------------- Function ABC(byval a as integer) as integer If a > 0 then x = 1
1
7886
by: nufanvandal | last post by:
Hello, I created a web form in html, I need to create a server-side script using ASP and embed it into the html, so that when the user clicks submit, it sends(saves) the data from text boxes, drop-downs etc, to a text(.txt) file on the server. It needs to be in csv format so that they can create an excel file from it. I'm not familar with this type of task, so any help is appreciated. So basically two things.
0
3391
by: HuckelBerry | last post by:
Does anyone have a sample SQL 2005 function the converts a Dotted IP address to its Long IP equivalent? Example: 192.168.0.1 converts to 3232235521. dbo.LongIPFuction(..) Scenario: I have a computer Asset table that contains the IP address of an asset and another table that contains the min and max ip ranges in the Long IP format for each site in our company. Before I can join the tables in a view I need to convert the Asset Table’s...
5
4032
by: Jameson | last post by:
Hi, I have a list of known colours, generated using: Dim colorNames As New System.Collections.Generic.List(Of String) For Each known As KnownColor In .GetValues(GetType(KnownColor)) Dim specific As Color = Color.FromKnownColor(known)
1
1595
by: Chipley | last post by:
Hi, I'm rather new to web development, and I'm trying to convert the following code (one of my first web pages) to a <div> format. In the code below, I use tables as placeholders for images (among other things), I'd like to remove all the table tags and use <div> tags instead, along with .css, in order to promote usability, and start learning how to make web pages the right way. I have a bunch of .css files that are defining the look of...
5
1437
tharden3
by: tharden3 | last post by:
I'm data-basing products for a local manufacturing company (I've been designing their entire website). Can I write PHP so that I set the limit of products visible per page, and then if the number of products exceeds that limit, it automatically generates another page?
1
2683
by: zwamin | last post by:
can someone let me know the html code for reading a text file with tab delimiter in a webpage in tabular format? number of rows in the text file is not known...
0
8565
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9113
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8977
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8839
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6488
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5837
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4577
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
1971
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.