By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,977 Members | 1,136 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,977 IT Pros & Developers. It's quick & easy.

Color Code

P: n/a
Hi,

I have got a peculiar requirement. I want to distinquish between the color
codes.

I have got two text fields and i will enter the color codes there.
The first text field will have background color
The second will have text color.

I want to validate if background color is dark then only light colors should
be entered in text.
and vice versa.

any solutions will be great help.

regards
vinod
Jul 22 '05 #1
Share this Question
Share on Google+
19 Replies


P: n/a
"Vinod" <vi***@erivasystems.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
: I have got a peculiar requirement. I want to distinquish between the color
: codes.
:
: I have got two text fields and i will enter the color codes there.
: The first text field will have background color
: The second will have text color.
:
: I want to validate if background color is dark then only light colors
should
: be entered in text.
: and vice versa.
:
: any solutions will be great help.

You can use the DOM on the client-side to determine what the current
background color is but this is not an ASP issue.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #2

P: n/a
Gazing into my crystal ball I observed "Roland Hall" <nobody@nowhere>
writing in news:uT**************@TK2MSFTNGP15.phx.gbl:
"Vinod" <vi***@erivasystems.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
: I have got a peculiar requirement. I want to distinquish between the
: color codes.
:
: I have got two text fields and i will enter the color codes there.
: The first text field will have background color
: The second will have text color.
:
: I want to validate if background color is dark then only light colors
: should be entered in text.
: and vice versa.
:
: any solutions will be great help.

You can use the DOM on the client-side to determine what the current
background color is but this is not an ASP issue.


I don't think the OP wants that. I think he's saying if someone puts #
000000 in one box, they can't put #666666 in the other box.
Color codes: <http://webmonkey.wired.com/webmonkey/reference/color_codes/>

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #3

P: n/a

"Vinod" <vi***@erivasystems.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi,

I have got a peculiar requirement. I want to distinquish between the color
codes.

I have got two text fields and i will enter the color codes there.
The first text field will have background color
The second will have text color.

I want to validate if background color is dark then only light colors should be entered in text.
and vice versa.


The brightness of a colour*** to human eyes is made up of

29.9% red, 58.7% green and 11.4% blue

so, for web colours,

(3 * red) + (6 * green) + blue will give you an approximate brightness
between 0 and 2550

Choose a threshold (e.g. 1200)

then background colours < 1200 are dark and need a light foreground,
and background colours >= 1200 are light and need a dark foreground.
*** One of the few advantages of being an English programmer in a US
dominated
world, is that I can always use 'colour' as an identifier - without any fear
that it is a
reserved word.

--
roger
Jul 22 '05 #4

P: n/a
"Adrienne" wrote in message
news:Xn***************************@207.115.63.158. ..
: Gazing into my crystal ball I observed "Roland Hall" <nobody@nowhere>
: writing in news:uT**************@TK2MSFTNGP15.phx.gbl:
:
: > "Vinod" <vi***@erivasystems.com> wrote in message
: > news:%2****************@tk2msftngp13.phx.gbl...
: >: I have got a peculiar requirement. I want to distinquish between the
: >: color codes.
: >:
: >: I have got two text fields and i will enter the color codes there.
: >: The first text field will have background color
: >: The second will have text color.
: >:
: >: I want to validate if background color is dark then only light colors
: >: should be entered in text.
: >: and vice versa.
: >:
: >: any solutions will be great help.
: >
: > You can use the DOM on the client-side to determine what the current
: > background color is but this is not an ASP issue.
: >
:
: I don't think the OP wants that. I think he's saying if someone puts #
: 000000 in one box, they can't put #666666 in the other box.
: Color codes: <http://webmonkey.wired.com/webmonkey/reference/color_codes/>

I realize what he's asking for. He has to determine what the background
color is so he can contrast the foreground color with it. AND, it's a
client-side issue, not an ASP one.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #5

P: n/a
Gazing into my crystal ball I observed "Roland Hall" <nobody@nowhere>
writing in news:#q**************@TK2MSFTNGP10.phx.gbl:
"Adrienne" wrote in message
news:Xn***************************@207.115.63.158. ..
: Gazing into my crystal ball I observed "Roland Hall" <nobody@nowhere>
: writing in news:uT**************@TK2MSFTNGP15.phx.gbl:
:
: > "Vinod" <vi***@erivasystems.com> wrote in message
: > news:%2****************@tk2msftngp13.phx.gbl...
: >: I have got a peculiar requirement. I want to distinquish between
: >: the color codes.
: >:
: >: I have got two text fields and i will enter the color codes there.
: >: The first text field will have background color
: >: The second will have text color.
: >:
: >: I want to validate if background color is dark then only light
: >: colors should be entered in text.
: >: and vice versa.
: >:
: >: any solutions will be great help.
: >
: > You can use the DOM on the client-side to determine what the current
: > background color is but this is not an ASP issue.
: >
:
: I don't think the OP wants that. I think he's saying if someone puts
: # 000000 in one box, they can't put #666666 in the other box.
: Color codes:
: <http://webmonkey.wired.com/webmonkey/reference/color_codes/>

I realize what he's asking for. He has to determine what the
background color is so he can contrast the foreground color with it.
AND, it's a client-side issue, not an ASP one.


Actually, we really don't know if it's client side or not.

<% dim background
dim foreground
dim nocontrast
background = request.form("background")
foreground = request.form("foreground")

'some kind of function to determine whether the colors contrast enough
if nocontrast = true then
response.write "There is not enough contrast"
end if
%>
<form method="post" action="">
<label for="background">Background: </label>
<select name="background" id="background">
<option value="000000" style="background-color:#000; color:#fff">#000000
</option>
<option value="c0c0c0" style="background-color:#c0c0c0; color:#fff">#c0c0c0
</option>
</select>
<label for="foreground">Foreground: </label>
<select name="foreground" id="foregound">
<option value="000000" style="background-color:#000; color:#fff">#000000
</option>
<option value="c0c0c0" style="background-color:#c0c0c0; color:#fff">#c0c0c0
</option>
</select>

<input type="submit" value="Submit">
</form>

Might be useful for someone trying to determine color blindness.
--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #6

P: n/a
Gazing into my crystal ball I observed Adrienne
<ar********@sbcglobal.net> writing in
news:Xn***************************@207.115.63.158:
Gazing into my crystal ball I observed "Roland Hall" <nobody@nowhere>
writing in news:#q**************@TK2MSFTNGP10.phx.gbl:
"Adrienne" wrote in message
news:Xn***************************@207.115.63.158. ..
: Gazing into my crystal ball I observed "Roland Hall" <nobody@nowhere>
: writing in news:uT**************@TK2MSFTNGP15.phx.gbl:
:
: > "Vinod" <vi***@erivasystems.com> wrote in message
: > news:%2****************@tk2msftngp13.phx.gbl...
: >: I have got a peculiar requirement. I want to distinquish between
: >: the color codes.
: >:
: >: I have got two text fields and i will enter the color codes there.
: >: The first text field will have background color
: >: The second will have text color.
: >:
: >: I want to validate if background color is dark then only light
: >: colors should be entered in text.
: >: and vice versa.
: >:
: >: any solutions will be great help.
: >
: > You can use the DOM on the client-side to determine what the
: > current background color is but this is not an ASP issue.
: >
:
: I don't think the OP wants that. I think he's saying if someone puts
: # 000000 in one box, they can't put #666666 in the other box.
: Color codes:
: <http://webmonkey.wired.com/webmonkey/reference/color_codes/>

I realize what he's asking for. He has to determine what the
background color is so he can contrast the foreground color with it.
AND, it's a client-side issue, not an ASP one.

Actually, we really don't know if it's client side or not.

<% dim background
dim foreground
dim nocontrast
background = request.form("background")
foreground = request.form("foreground")

'some kind of function to determine whether the colors contrast enough
if nocontrast = true then
response.write "There is not enough contrast"
end if
%>
<form method="post" action="">
<label for="background">Background: </label>
<select name="background" id="background">
<option value="000000" style="background-color:#000; color:#fff">#000000
</option> <option value="c0c0c0" style="background-color:#c0c0c0;
color:#fff">#c0c0c0 </option> </select> <label
for="foreground">Foreground:
</label> <select name="foreground" id="foregound">
<option value="000000" style="background-color:#000; color:#fff">#000000
</option> <option value="c0c0c0" style="background-color:#c0c0c0;
color:#fff">#c0c0c0 </option> </select>

<input type="submit" value="Submit"> </form>

Might be useful for someone trying to determine color blindness.


The OP emailed me:
you got the problem right. I will tell the scenario also i am building a
website where the users can choose there
own color combinations.so when the user selects a color and if it is
bright
color say he has selected the background color then the next selection
should be
light color so that the combination looks good,


I guess not everyone reads signatures.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #7

P: n/a
"Adrienne" wrote in message
news:Xn****************************@207.115.63.158 ...
: Gazing into my crystal ball I observed Adrienne
: <ar********@sbcglobal.net> writing in
: news:Xn***************************@207.115.63.158:
:
: > Gazing into my crystal ball I observed "Roland Hall" <nobody@nowhere>
: > writing in news:#q**************@TK2MSFTNGP10.phx.gbl:
: >
: >> "Adrienne" wrote in message
: >> news:Xn***************************@207.115.63.158. ..
: >>: Gazing into my crystal ball I observed "Roland Hall" <nobody@nowhere>
: >>: writing in news:uT**************@TK2MSFTNGP15.phx.gbl:
: >>:
: >>: > "Vinod" <vi***@erivasystems.com> wrote in message
: >>: > news:%2****************@tk2msftngp13.phx.gbl...
: >>: >: I have got a peculiar requirement. I want to distinquish between
: >>: >: the color codes.
: >>: >:
: >>: >: I have got two text fields and i will enter the color codes there.
: >>: >: The first text field will have background color
: >>: >: The second will have text color.
: >>: >:
: >>: >: I want to validate if background color is dark then only light
: >>: >: colors should be entered in text.
: >>: >: and vice versa.
: >>: >:
: >>: >: any solutions will be great help.
: >>: >
: >>: > You can use the DOM on the client-side to determine what the
: >>: > current background color is but this is not an ASP issue.
: >>: >
: >>:
: >>: I don't think the OP wants that. I think he's saying if someone puts
: >>: # 000000 in one box, they can't put #666666 in the other box.
: >>: Color codes:
: >>: <http://webmonkey.wired.com/webmonkey/reference/color_codes/>
: >>
: >> I realize what he's asking for. He has to determine what the
: >> background color is so he can contrast the foreground color with it.
: >> AND, it's a client-side issue, not an ASP one.
: >>
: >
: > Actually, we really don't know if it's client side or not.
: >
: ><% dim background
: > dim foreground
: > dim nocontrast
: >
: >
: > background = request.form("background")
: > foreground = request.form("foreground")
: >
: > 'some kind of function to determine whether the colors contrast enough
: > if nocontrast = true then
: > response.write "There is not enough contrast"
: > end if
: > %>
: ><form method="post" action="">
: ><label for="background">Background: </label>
: ><select name="background" id="background">
: ><option value="000000" style="background-color:#000; color:#fff">#000000
: ></option> <option value="c0c0c0" style="background-color:#c0c0c0;
: > color:#fff">#c0c0c0 </option> </select> <label
: > for="foreground">Foreground:
: ></label> <select name="foreground" id="foregound">
: ><option value="000000" style="background-color:#000; color:#fff">#000000
: ></option> <option value="c0c0c0" style="background-color:#c0c0c0;
: > color:#fff">#c0c0c0 </option> </select>
: >
: ><input type="submit" value="Submit"> </form>
: >
: > Might be useful for someone trying to determine color blindness.
:
: The OP emailed me:
:
: >you got the problem right. I will tell the scenario also i am building a
: >website where the users can choose there
: >own color combinations.so when the user selects a color and if it is
: >bright
: >color say he has selected the background color then the next selection
: >should be
: >light color so that the combination looks good,
:
: I guess not everyone reads signatures.

Not to mention he said, "the users can choose..." Can't do that from the
server-side. The user selects a color and he wants to provide a contrasting
color for the foreground. The server doesn't need to see color is the point
I was trying to make nor can it determine what color the user chose unless
it is posted. However, with his email to you, it appears he doesn't want
any server-side. The user will be doing it on their end. How will they
read his message to them that the colors do not contrast? Perhaps he will
use black/white, which he could just do anyway and eliminate the issue.

If the user is selecting color contrast that is best for them, they can do
that with their browser and override his settings. If they have trouble
seeing, they're most likely doing it already or they are using something
else to help them, like text-speech.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #8

P: n/a

"Roland Hall" <nobody@nowhere> wrote in message
news:ee**************@TK2MSFTNGP15.phx.gbl...
"Adrienne" wrote in message
news:Xn****************************@207.115.63.158 ...
: Gazing into my crystal ball I observed Adrienne
: <ar********@sbcglobal.net> writing in
: news:Xn***************************@207.115.63.158:
:
: > Gazing into my crystal ball I observed "Roland Hall" <nobody@nowhere>
: > writing in news:#q**************@TK2MSFTNGP10.phx.gbl:
: >
: >> "Adrienne" wrote in message
: >> news:Xn***************************@207.115.63.158. ..
: >>: Gazing into my crystal ball I observed "Roland Hall" <nobody@nowhere> : >>: writing in news:uT**************@TK2MSFTNGP15.phx.gbl:
: >>:
: >>: > "Vinod" <vi***@erivasystems.com> wrote in message
: >>: > news:%2****************@tk2msftngp13.phx.gbl...
: >>: >: I have got a peculiar requirement. I want to distinquish between
: >>: >: the color codes.
: >>: >:
: >>: >: I have got two text fields and i will enter the color codes there. : >>: >: The first text field will have background color
: >>: >: The second will have text color.
: >>: >:
: >>: >: I want to validate if background color is dark then only light
: >>: >: colors should be entered in text.
: >>: >: and vice versa.
: >>: >:
: >>: >: any solutions will be great help.
: >>: >
: >>: > You can use the DOM on the client-side to determine what the
: >>: > current background color is but this is not an ASP issue.
: >>: >
: >>:
: >>: I don't think the OP wants that. I think he's saying if someone puts : >>: # 000000 in one box, they can't put #666666 in the other box.
: >>: Color codes:
: >>: <http://webmonkey.wired.com/webmonkey/reference/color_codes/>
: >>
: >> I realize what he's asking for. He has to determine what the
: >> background color is so he can contrast the foreground color with it.
: >> AND, it's a client-side issue, not an ASP one.
: >>
: >
: > Actually, we really don't know if it's client side or not.
: >
: ><% dim background
: > dim foreground
: > dim nocontrast
: >
: >
: > background = request.form("background")
: > foreground = request.form("foreground")
: >
: > 'some kind of function to determine whether the colors contrast enough
: > if nocontrast = true then
: > response.write "There is not enough contrast"
: > end if
: > %>
: ><form method="post" action="">
: ><label for="background">Background: </label>
: ><select name="background" id="background">
: ><option value="000000" style="background-color:#000; color:#fff">#000000 : ></option> <option value="c0c0c0" style="background-color:#c0c0c0;
: > color:#fff">#c0c0c0 </option> </select> <label
: > for="foreground">Foreground:
: ></label> <select name="foreground" id="foregound">
: ><option value="000000" style="background-color:#000; color:#fff">#000000 : ></option> <option value="c0c0c0" style="background-color:#c0c0c0;
: > color:#fff">#c0c0c0 </option> </select>
: >
: ><input type="submit" value="Submit"> </form>
: >
: > Might be useful for someone trying to determine color blindness.
:
: The OP emailed me:
:
: >you got the problem right. I will tell the scenario also i am building a : >website where the users can choose there
: >own color combinations.so when the user selects a color and if it is
: >bright
: >color say he has selected the background color then the next selection
: >should be
: >light color so that the combination looks good,
:
: I guess not everyone reads signatures.

Not to mention he said, "the users can choose..." Can't do that from the
server-side. The user selects a color and he wants to provide a contrasting color for the foreground. The server doesn't need to see color is the point I was trying to make nor can it determine what color the user chose unless
it is posted. However, with his email to you, it appears he doesn't want
any server-side. The user will be doing it on their end. How will they
read his message to them that the colors do not contrast? Perhaps he will
use black/white, which he could just do anyway and eliminate the issue.

If the user is selecting color contrast that is best for them, they can do
that with their browser and override his settings. If they have trouble
seeing, they're most likely doing it already or they are using something
else to help them, like text-speech.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp MSDN Library - http://msdn.microsoft.com/library/default.asp

I think you're still misinterpreting the OP's original intent. As I
understand it, he has a form with two (2) text fields where the end user can
enter color codes (e.g. #FFFFFF, #000000, etc..). One for background, one
for foreground. On the server-side, when these color codes are submitted,
the difference between their brightness levels is calculated. If the
difference is above a specified threshold, then the color code values are
stored (perhaps in a database), if not the user is redirected to a page that
indicates there is insufficient contrast between the foreground and
background colors specified. I don't think there's any client-side going on
in this scenario. I imagine this is for some skinning/personalization
functionality on the website.
Jul 22 '05 #9

P: n/a
"Chris Hohmann" <no****@thankyou.com> wrote in message
news:u$**************@TK2MSFTNGP14.phx.gbl...
:
: "Roland Hall" <nobody@nowhere> wrote in message
: news:ee**************@TK2MSFTNGP15.phx.gbl...
: > "Adrienne" wrote in message
: > news:Xn****************************@207.115.63.158 ...
: > : Gazing into my crystal ball I observed Adrienne
: > : <ar********@sbcglobal.net> writing in
: > : news:Xn***************************@207.115.63.158:
: > :
: > : > Gazing into my crystal ball I observed "Roland Hall"
<nobody@nowhere>
: > : > writing in news:#q**************@TK2MSFTNGP10.phx.gbl:
: > : >
: > : >> "Adrienne" wrote in message
: > : >> news:Xn***************************@207.115.63.158. ..
: > : >>: Gazing into my crystal ball I observed "Roland Hall"
: <nobody@nowhere>
: > : >>: writing in news:uT**************@TK2MSFTNGP15.phx.gbl:
: > : >>:
: > : >>: > "Vinod" <vi***@erivasystems.com> wrote in message
: > : >>: > news:%2****************@tk2msftngp13.phx.gbl...
: > : >>: >: I have got a peculiar requirement. I want to distinquish
between
: > : >>: >: the color codes.
: > : >>: >:
: > : >>: >: I have got two text fields and i will enter the color codes
: there.
: > : >>: >: The first text field will have background color
: > : >>: >: The second will have text color.
: > : >>: >:
: > : >>: >: I want to validate if background color is dark then only light
: > : >>: >: colors should be entered in text.
: > : >>: >: and vice versa.
: > : >>: >:
: > : >>: >: any solutions will be great help.
: > : >>: >
: > : >>: > You can use the DOM on the client-side to determine what the
: > : >>: > current background color is but this is not an ASP issue.
: > : >>: >
: > : >>:
: > : >>: I don't think the OP wants that. I think he's saying if someone
: puts
: > : >>: # 000000 in one box, they can't put #666666 in the other box.
: > : >>: Color codes:
: > : >>: <http://webmonkey.wired.com/webmonkey/reference/color_codes/>
: > : >>
: > : >> I realize what he's asking for. He has to determine what the
: > : >> background color is so he can contrast the foreground color with
it.
: > : >> AND, it's a client-side issue, not an ASP one.
: > : >>
: > : >
: > : > Actually, we really don't know if it's client side or not.
: > : >
: > : ><% dim background
: > : > dim foreground
: > : > dim nocontrast
: > : >
: > : >
: > : > background = request.form("background")
: > : > foreground = request.form("foreground")
: > : >
: > : > 'some kind of function to determine whether the colors contrast
enough
: > : > if nocontrast = true then
: > : > response.write "There is not enough contrast"
: > : > end if
: > : > %>
: > : ><form method="post" action="">
: > : ><label for="background">Background: </label>
: > : ><select name="background" id="background">
: > : ><option value="000000" style="background-color:#000;
: color:#fff">#000000
: > : ></option> <option value="c0c0c0" style="background-color:#c0c0c0;
: > : > color:#fff">#c0c0c0 </option> </select> <label
: > : > for="foreground">Foreground:
: > : ></label> <select name="foreground" id="foregound">
: > : ><option value="000000" style="background-color:#000;
: color:#fff">#000000
: > : ></option> <option value="c0c0c0" style="background-color:#c0c0c0;
: > : > color:#fff">#c0c0c0 </option> </select>
: > : >
: > : ><input type="submit" value="Submit"> </form>
: > : >
: > : > Might be useful for someone trying to determine color blindness.
: > :
: > : The OP emailed me:
: > :
: > : >you got the problem right. I will tell the scenario also i am
building
: a
: > : >website where the users can choose there
: > : >own color combinations.so when the user selects a color and if it is
: > : >bright
: > : >color say he has selected the background color then the next
selection
: > : >should be
: > : >light color so that the combination looks good,
: > :
: > : I guess not everyone reads signatures.
: >
: > Not to mention he said, "the users can choose..." Can't do that from
the
: > server-side. The user selects a color and he wants to provide a
: contrasting
: > color for the foreground. The server doesn't need to see color is the
: point
: > I was trying to make nor can it determine what color the user chose
unless
: > it is posted. However, with his email to you, it appears he doesn't
want
: > any server-side. The user will be doing it on their end. How will they
: > read his message to them that the colors do not contrast? Perhaps he
will
: > use black/white, which he could just do anyway and eliminate the issue.
: >
: > If the user is selecting color contrast that is best for them, they can
do
: > that with their browser and override his settings. If they have trouble
: > seeing, they're most likely doing it already or they are using something
: > else to help them, like text-speech.
: >
: > --
: > Roland Hall
: > /* This information is distributed in the hope that it will be useful,
but
: > without any warranty; without even the implied warranty of
merchantability
: > or fitness for a particular purpose. */
: > Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
: > WSH 5.6 Documentation -
: http://msdn.microsoft.com/downloads/list/webdev.asp
: > MSDN Library - http://msdn.microsoft.com/library/default.asp
: >
: >
: I think you're still misinterpreting the OP's original intent. As I
: understand it, he has a form with two (2) text fields where the end user
can
: enter color codes (e.g. #FFFFFF, #000000, etc..). One for background, one
: for foreground. On the server-side, when these color codes are submitted,
: the difference between their brightness levels is calculated. If the
: difference is above a specified threshold, then the color code values are
: stored (perhaps in a database), if not the user is redirected to a page
that
: indicates there is insufficient contrast between the foreground and
: background colors specified. I don't think there's any client-side going
on
: in this scenario. I imagine this is for some skinning/personalization
: functionality on the website.

I'm willing to concede I'm missing it but I don't see how you get that out
of this statement:

"I want to validate if background color is dark then only light colors
should be entered in text. and vice versa."

"I want to validate if background is dark." Following your conclusion, the
value has already been selected.

"THEN only light colors should be entered in text." The user is entering
the text, or selecting from a list, but can only enter/select colors that
are in contrast with the background they have already chosen. To me, this
means the options have changed based on the first input and the webmaster
wants to be in control of those options, not the user.

"and vice versa." This means, to me, if background first, foreground
options are based upon that color. If foreground color is selected, then
background options are based upon that color.

His email to Adrienne, parallels what I just wrote.
you got the problem right. I will tell the scenario also i am building a
website where the users can choose there
own color combinations.so when the user selects a color and if it is
bright
color say he has selected the background color then the next selection
should be
light color so that the combination looks good,


This could be a simple list or numerous rectangles/squares on a page of the
color they selected with all of the available options for the contrasting
color for the text. The user could then select the one they want and THIS
could then be added to a database.

I think I've actually seen this somewhere before and it was done all
client-side. It could be done server-side but I think it would be a waste
to do so. We may have to agree to disagree on this one because I just can't
see his comments as anything else.

One last thing, why would the user be directed to a page informing them
their selections are inadequate for contrast? Who the Hell is looking at
this anyway? Isn't it the user? If it's their skinning/personalization
option, then why is the webmaster trying to decide for them? I think the OP
just wants to help the user choose the colors that work best together by
letting them know what the available color options are that would contrast
the most for a better viewing experience. However, I think the OP, while
offering these choices, should not only allow the user to choose a
predetermined pair but also choose any colors they want. Some may like
orange on red. Who am I to deny them that choice? Sounds like fish on
Fridays to me. (O:=

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #10

P: n/a

"Roland Hall" <nobody@nowhere> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
"Chris Hohmann" <no****@thankyou.com> wrote in message
news:u$**************@TK2MSFTNGP14.phx.gbl...
:
: "Roland Hall" <nobody@nowhere> wrote in message
: news:ee**************@TK2MSFTNGP15.phx.gbl...
: > "Adrienne" wrote in message
: > news:Xn****************************@207.115.63.158 ...
: > : Gazing into my crystal ball I observed Adrienne
: > : <ar********@sbcglobal.net> writing in
: > : news:Xn***************************@207.115.63.158:
: > :
: > : > Gazing into my crystal ball I observed "Roland Hall"
<nobody@nowhere>
: > : > writing in news:#q**************@TK2MSFTNGP10.phx.gbl:
: > : >
: > : >> "Adrienne" wrote in message
: > : >> news:Xn***************************@207.115.63.158. ..
: > : >>: Gazing into my crystal ball I observed "Roland Hall"
: <nobody@nowhere>
: > : >>: writing in news:uT**************@TK2MSFTNGP15.phx.gbl:
: > : >>:
: > : >>: > "Vinod" <vi***@erivasystems.com> wrote in message
: > : >>: > news:%2****************@tk2msftngp13.phx.gbl...
: > : >>: >: I have got a peculiar requirement. I want to distinquish
between
: > : >>: >: the color codes.
: > : >>: >:
: > : >>: >: I have got two text fields and i will enter the color codes
: there.
: > : >>: >: The first text field will have background color
: > : >>: >: The second will have text color.
: > : >>: >:
: > : >>: >: I want to validate if background color is dark then only light : > : >>: >: colors should be entered in text.
: > : >>: >: and vice versa.
: > : >>: >:
: > : >>: >: any solutions will be great help.
: > : >>: >
: > : >>: > You can use the DOM on the client-side to determine what the
: > : >>: > current background color is but this is not an ASP issue.
: > : >>: >
: > : >>:
: > : >>: I don't think the OP wants that. I think he's saying if someone
: puts
: > : >>: # 000000 in one box, they can't put #666666 in the other box.
: > : >>: Color codes:
: > : >>: <http://webmonkey.wired.com/webmonkey/reference/color_codes/>
: > : >>
: > : >> I realize what he's asking for. He has to determine what the
: > : >> background color is so he can contrast the foreground color with
it.
: > : >> AND, it's a client-side issue, not an ASP one.
: > : >>
: > : >
: > : > Actually, we really don't know if it's client side or not.
: > : >
: > : ><% dim background
: > : > dim foreground
: > : > dim nocontrast
: > : >
: > : >
: > : > background = request.form("background")
: > : > foreground = request.form("foreground")
: > : >
: > : > 'some kind of function to determine whether the colors contrast
enough
: > : > if nocontrast = true then
: > : > response.write "There is not enough contrast"
: > : > end if
: > : > %>
: > : ><form method="post" action="">
: > : ><label for="background">Background: </label>
: > : ><select name="background" id="background">
: > : ><option value="000000" style="background-color:#000;
: color:#fff">#000000
: > : ></option> <option value="c0c0c0" style="background-color:#c0c0c0;
: > : > color:#fff">#c0c0c0 </option> </select> <label
: > : > for="foreground">Foreground:
: > : ></label> <select name="foreground" id="foregound">
: > : ><option value="000000" style="background-color:#000;
: color:#fff">#000000
: > : ></option> <option value="c0c0c0" style="background-color:#c0c0c0;
: > : > color:#fff">#c0c0c0 </option> </select>
: > : >
: > : ><input type="submit" value="Submit"> </form>
: > : >
: > : > Might be useful for someone trying to determine color blindness.
: > :
: > : The OP emailed me:
: > :
: > : >you got the problem right. I will tell the scenario also i am
building
: a
: > : >website where the users can choose there
: > : >own color combinations.so when the user selects a color and if it is : > : >bright
: > : >color say he has selected the background color then the next
selection
: > : >should be
: > : >light color so that the combination looks good,
: > :
: > : I guess not everyone reads signatures.
: >
: > Not to mention he said, "the users can choose..." Can't do that from
the
: > server-side. The user selects a color and he wants to provide a
: contrasting
: > color for the foreground. The server doesn't need to see color is the
: point
: > I was trying to make nor can it determine what color the user chose
unless
: > it is posted. However, with his email to you, it appears he doesn't
want
: > any server-side. The user will be doing it on their end. How will they : > read his message to them that the colors do not contrast? Perhaps he
will
: > use black/white, which he could just do anyway and eliminate the issue. : >
: > If the user is selecting color contrast that is best for them, they can do
: > that with their browser and override his settings. If they have trouble : > seeing, they're most likely doing it already or they are using something : > else to help them, like text-speech.
: >
: > --
: > Roland Hall
: > /* This information is distributed in the hope that it will be useful,
but
: > without any warranty; without even the implied warranty of
merchantability
: > or fitness for a particular purpose. */
: > Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
: > WSH 5.6 Documentation -
: http://msdn.microsoft.com/downloads/list/webdev.asp
: > MSDN Library - http://msdn.microsoft.com/library/default.asp
: >
: >
: I think you're still misinterpreting the OP's original intent. As I
: understand it, he has a form with two (2) text fields where the end user
can
: enter color codes (e.g. #FFFFFF, #000000, etc..). One for background, one : for foreground. On the server-side, when these color codes are submitted, : the difference between their brightness levels is calculated. If the
: difference is above a specified threshold, then the color code values are : stored (perhaps in a database), if not the user is redirected to a page
that
: indicates there is insufficient contrast between the foreground and
: background colors specified. I don't think there's any client-side going
on
: in this scenario. I imagine this is for some skinning/personalization
: functionality on the website.

I'm willing to concede I'm missing it but I don't see how you get that out
of this statement:

"I want to validate if background color is dark then only light colors
should be entered in text. and vice versa."

"I want to validate if background is dark." Following your conclusion, the value has already been selected.

"THEN only light colors should be entered in text." The user is entering
the text, or selecting from a list, but can only enter/select colors that
are in contrast with the background they have already chosen. To me, this
means the options have changed based on the first input and the webmaster
wants to be in control of those options, not the user.

"and vice versa." This means, to me, if background first, foreground
options are based upon that color. If foreground color is selected, then
background options are based upon that color.

His email to Adrienne, parallels what I just wrote.
you got the problem right. I will tell the scenario also i am building a
website where the users can choose there
own color combinations.so when the user selects a color and if it is
bright
color say he has selected the background color then the next selection
should be
light color so that the combination looks good,
This could be a simple list or numerous rectangles/squares on a page of

the color they selected with all of the available options for the contrasting
color for the text. The user could then select the one they want and THIS could then be added to a database.

I think I've actually seen this somewhere before and it was done all
client-side. It could be done server-side but I think it would be a waste
to do so. We may have to agree to disagree on this one because I just can't see his comments as anything else.

One last thing, why would the user be directed to a page informing them
their selections are inadequate for contrast? Who the Hell is looking at
this anyway? Isn't it the user? If it's their skinning/personalization
option, then why is the webmaster trying to decide for them? I think the OP just wants to help the user choose the colors that work best together by
letting them know what the available color options are that would contrast
the most for a better viewing experience. However, I think the OP, while
offering these choices, should not only allow the user to choose a
predetermined pair but also choose any colors they want. Some may like
orange on red. Who am I to deny them that choice? Sounds like fish on
Fridays to me. (O:=

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp MSDN Library - http://msdn.microsoft.com/library/default.asp


Hi Guys,

I think some understood my requirement and some didnot.

I will explain it in a simple way :-

a) I got a web site.
b) In the site i have a page where i can set the color settings.
d) I should be able to set my background color,Body Color,Button color,Link
color
e) I am entering the hexadecimal code, which can be even selected froma
color picker javascript.
f) Now if i give my background color has light and also my link color as
light i may not be even seeing certain links.

I am providing these options to the users, so that they can customize there
colors.
Now suppose a user changes certain color combinations , he may not be able
be see certain facilities like

if you give Body Color : FFFFCC
and Link Color :ffffff

which i want to avoid .

Thanks for all the reply

Regards
Vinod


Jul 22 '05 #11

P: n/a
"Vinod" wrote in message news:%2****************@TK2MSFTNGP10.phx.gbl...
:
: "Roland Hall" <nobody@nowhere> wrote in message
: news:%2****************@TK2MSFTNGP14.phx.gbl...
: > "Chris Hohmann" <no****@thankyou.com> wrote in message
: > news:u$**************@TK2MSFTNGP14.phx.gbl...
: > :
: > : "Roland Hall" <nobody@nowhere> wrote in message
: > : news:ee**************@TK2MSFTNGP15.phx.gbl...
: > : > "Adrienne" wrote in message
: > : > news:Xn****************************@207.115.63.158 ...
: > : > : Gazing into my crystal ball I observed Adrienne
: > : > : <ar********@sbcglobal.net> writing in
: > : > : news:Xn***************************@207.115.63.158:
: > : > :
: > : > : > Gazing into my crystal ball I observed "Roland Hall"
: > <nobody@nowhere>
: > : > : > writing in news:#q**************@TK2MSFTNGP10.phx.gbl:
: > : > : >
: > : > : >> "Adrienne" wrote in message
: > : > : >> news:Xn***************************@207.115.63.158. ..
: > : > : >>: Gazing into my crystal ball I observed "Roland Hall"
: > : <nobody@nowhere>
: > : > : >>: writing in news:uT**************@TK2MSFTNGP15.phx.gbl:
: > : > : >>:
: > : > : >>: > "Vinod" <vi***@erivasystems.com> wrote in message
: > : > : >>: > news:%2****************@tk2msftngp13.phx.gbl...
: > : > : >>: >: I have got a peculiar requirement. I want to distinquish
: > between
: > : > : >>: >: the color codes.
: > : > : >>: >:
: > : > : >>: >: I have got two text fields and i will enter the color codes
: > : there.
: > : > : >>: >: The first text field will have background color
: > : > : >>: >: The second will have text color.
: > : > : >>: >:
: > : > : >>: >: I want to validate if background color is dark then only
: light
: > : > : >>: >: colors should be entered in text.
: > : > : >>: >: and vice versa.
: > : > : >>: >:
: > : > : >>: >: any solutions will be great help.
: > : > : >>: >
: > : > : >>: > You can use the DOM on the client-side to determine what the
: > : > : >>: > current background color is but this is not an ASP issue.
: > : > : >>: >
: > : > : >>:
: > : > : >>: I don't think the OP wants that. I think he's saying if
someone
: > : puts
: > : > : >>: # 000000 in one box, they can't put #666666 in the other box.
: > : > : >>: Color codes:
: > : > : >>: <http://webmonkey.wired.com/webmonkey/reference/color_codes/>
: > : > : >>
: > : > : >> I realize what he's asking for. He has to determine what the
: > : > : >> background color is so he can contrast the foreground color
with
: > it.
: > : > : >> AND, it's a client-side issue, not an ASP one.
: > : > : >>
: > : > : >
: > : > : > Actually, we really don't know if it's client side or not.
: > : > : >
: > : > : ><% dim background
: > : > : > dim foreground
: > : > : > dim nocontrast
: > : > : >
: > : > : >
: > : > : > background = request.form("background")
: > : > : > foreground = request.form("foreground")
: > : > : >
: > : > : > 'some kind of function to determine whether the colors contrast
: > enough
: > : > : > if nocontrast = true then
: > : > : > response.write "There is not enough contrast"
: > : > : > end if
: > : > : > %>
: > : > : ><form method="post" action="">
: > : > : ><label for="background">Background: </label>
: > : > : ><select name="background" id="background">
: > : > : ><option value="000000" style="background-color:#000;
: > : color:#fff">#000000
: > : > : ></option> <option value="c0c0c0" style="background-color:#c0c0c0;
: > : > : > color:#fff">#c0c0c0 </option> </select> <label
: > : > : > for="foreground">Foreground:
: > : > : ></label> <select name="foreground" id="foregound">
: > : > : ><option value="000000" style="background-color:#000;
: > : color:#fff">#000000
: > : > : ></option> <option value="c0c0c0" style="background-color:#c0c0c0;
: > : > : > color:#fff">#c0c0c0 </option> </select>
: > : > : >
: > : > : ><input type="submit" value="Submit"> </form>
: > : > : >
: > : > : > Might be useful for someone trying to determine color blindness.
: > : > :
: > : > : The OP emailed me:
: > : > :
: > : > : >you got the problem right. I will tell the scenario also i am
: > building
: > : a
: > : > : >website where the users can choose there
: > : > : >own color combinations.so when the user selects a color and if it
: is
: > : > : >bright
: > : > : >color say he has selected the background color then the next
: > selection
: > : > : >should be
: > : > : >light color so that the combination looks good,
: > : > :
: > : > : I guess not everyone reads signatures.
: > : >
: > : > Not to mention he said, "the users can choose..." Can't do that
from
: > the
: > : > server-side. The user selects a color and he wants to provide a
: > : contrasting
: > : > color for the foreground. The server doesn't need to see color is
the
: > : point
: > : > I was trying to make nor can it determine what color the user chose
: > unless
: > : > it is posted. However, with his email to you, it appears he doesn't
: > want
: > : > any server-side. The user will be doing it on their end. How will
: they
: > : > read his message to them that the colors do not contrast? Perhaps
he
: > will
: > : > use black/white, which he could just do anyway and eliminate the
: issue.
: > : >
: > : > If the user is selecting color contrast that is best for them, they
: can
: > do
: > : > that with their browser and override his settings. If they have
: trouble
: > : > seeing, they're most likely doing it already or they are using
: something
: > : > else to help them, like text-speech.
: > : >
: > : > --
: > : > Roland Hall
: > : > /* This information is distributed in the hope that it will be
useful,
: > but
: > : > without any warranty; without even the implied warranty of
: > merchantability
: > : > or fitness for a particular purpose. */
: > : > Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
: > : > WSH 5.6 Documentation -
: > : http://msdn.microsoft.com/downloads/list/webdev.asp
: > : > MSDN Library - http://msdn.microsoft.com/library/default.asp
: > : >
: > : >
: > : I think you're still misinterpreting the OP's original intent. As I
: > : understand it, he has a form with two (2) text fields where the end
user
: > can
: > : enter color codes (e.g. #FFFFFF, #000000, etc..). One for background,
: one
: > : for foreground. On the server-side, when these color codes are
: submitted,
: > : the difference between their brightness levels is calculated. If the
: > : difference is above a specified threshold, then the color code values
: are
: > : stored (perhaps in a database), if not the user is redirected to a
page
: > that
: > : indicates there is insufficient contrast between the foreground and
: > : background colors specified. I don't think there's any client-side
going
: > on
: > : in this scenario. I imagine this is for some skinning/personalization
: > : functionality on the website.
: >
: > I'm willing to concede I'm missing it but I don't see how you get that
out
: > of this statement:
: >
: > "I want to validate if background color is dark then only light colors
: > should be entered in text. and vice versa."
: >
: > "I want to validate if background is dark." Following your conclusion,
: the
: > value has already been selected.
: >
: > "THEN only light colors should be entered in text." The user is
entering
: > the text, or selecting from a list, but can only enter/select colors
that
: > are in contrast with the background they have already chosen. To me,
this
: > means the options have changed based on the first input and the
webmaster
: > wants to be in control of those options, not the user.
: >
: > "and vice versa." This means, to me, if background first, foreground
: > options are based upon that color. If foreground color is selected,
then
: > background options are based upon that color.
: >
: > His email to Adrienne, parallels what I just wrote.
: >
: > >you got the problem right. I will tell the scenario also i am building
a
: > >website where the users can choose there
: > >own color combinations.so when the user selects a color and if it is
: > >bright
: > >color say he has selected the background color then the next selection
: > >should be
: > >light color so that the combination looks good,
: >
: > This could be a simple list or numerous rectangles/squares on a page of
: the
: > color they selected with all of the available options for the
contrasting
: > color for the text. The user could then select the one they want and
THIS
:
: > could then be added to a database.
: >
: > I think I've actually seen this somewhere before and it was done all
: > client-side. It could be done server-side but I think it would be a
waste
: > to do so. We may have to agree to disagree on this one because I just
: can't
: > see his comments as anything else.
: >
: > One last thing, why would the user be directed to a page informing them
: > their selections are inadequate for contrast? Who the Hell is looking
at
: > this anyway? Isn't it the user? If it's their skinning/personalization
: > option, then why is the webmaster trying to decide for them? I think
the
: OP
: > just wants to help the user choose the colors that work best together by
: > letting them know what the available color options are that would
contrast
: > the most for a better viewing experience. However, I think the OP,
while
: > offering these choices, should not only allow the user to choose a
: > predetermined pair but also choose any colors they want. Some may like
: > orange on red. Who am I to deny them that choice? Sounds like fish on
: > Fridays to me. (O:=
: >
: > --
: > Roland Hall
: > /* This information is distributed in the hope that it will be useful,
but
: > without any warranty; without even the implied warranty of
merchantability
: > or fitness for a particular purpose. */
: > Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
: > WSH 5.6 Documentation -
: http://msdn.microsoft.com/downloads/list/webdev.asp
: > MSDN Library - http://msdn.microsoft.com/library/default.asp
: >
: >
:
: Hi Guys,
:
: I think some understood my requirement and some didnot.
:
: I will explain it in a simple way :-
:
: a) I got a web site.
: b) In the site i have a page where i can set the color settings.
: d) I should be able to set my background color,Body Color,Button
color,Link
: color
: e) I am entering the hexadecimal code, which can be even selected froma
: color picker javascript.
: f) Now if i give my background color has light and also my link color as
: light i may not be even seeing certain links.
:
: I am providing these options to the users, so that they can customize
there
: colors.
: Now suppose a user changes certain color combinations , he may not be able
: be see certain facilities like
:
: if you give Body Color : FFFFCC
: and Link Color :ffffff
:
: which i want to avoid .

Will this help?

http://www.markup.co.nz/palettizer/palettizer.htm
http://www.juicystudio.com/services/...#brightformula
http://www.nils.org.au/ais/web/resou...ser/index.html
http://www.snook.ca/technical/colour...st/colour.html
http://www.worqx.com/palette/index.htm
http://www.meyerweb.com/eric/tools/color-blend/
http://www.mundidesign.com/webct/webct.html
http://msdn.microsoft.com/library/de.../colorpick.asp
http://msdn.microsoft.com/library/de...tml/safety.asp
http://www.colorsystem.com/

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #12

P: n/a
Function colDist(strColA, strColB)
colDist = -1
If Not IsValidColor(strColA) Then Exit Function
If Not IsValidColor(strColB) Then Exit Function

Dim lngDR
Dim lngDG
Dim lngDB

lngDR = CLng("&H" & Mid$(strColA, 2, 2)) - CLng("&H" & Mid$(strColB,
2, 2))
lngDG = CLng("&H" & Mid$(strColA, 4, 2)) - CLng("&H" & Mid$(strColB,
4, 2))
lngDB = CLng("&H" & Mid$(strColA, 6, 2)) - CLng("&H" & Mid$(strColB,
6, 2))

colDist = Sqr(lngDR * lngDR + lngDG * lngDG + lngDB * lngDB)
End Function

Function IsValidColor(strCol)
IsValidColor = False
If Len(strCol) <> 7 Then Exit Function
If Mid(strCol, 1, 1) <> "#" Then Exit Function

Dim lngI
For lngI = 1 To 6
If InStr("0123456789abcdefABCDEF", Mid(strCol, 1 + lngI, 1)) = 0
Then Exit Function
Next lngI

IsValidColor = True
End Function

if you need an explanation, just ask.
regards,
simon
Jul 22 '05 #13

P: n/a
Gazing into my crystal ball I observed "Roland Hall" <nobody@nowhere>
writing in news:#H**************@TK2MSFTNGP14.phx.gbl:
One last thing, why would the user be directed to a page informing them
their selections are inadequate for contrast? Who the Hell is looking
at this anyway? Isn't it the user? If it's their
skinning/personalization option, then why is the webmaster trying to
decide for them? I think the OP just wants to help the user choose the
colors that work best together by letting them know what the available
color options are that would contrast the most for a better viewing
experience. However, I think the OP, while offering these choices,
should not only allow the user to choose a predetermined pair but also
choose any colors they want. Some may like orange on red. Who am I to
deny them that choice? Sounds like fish on Fridays to me.


With an increasing awareness of accessibility issues, designers and
developers are becoming more aware of colors. What you might be able to
see, someone with low vision cannot.

If one is offering a service where users can create web pages on the fly,
and they choose the background and foreground colors, then it would be
nice to remind the user that certain colors do not have enough contrast
for low vision visitors (not to mention tiny font sizes in pixels that
can't be resized).

The good thing about doing the validation server side is that you do not
run into problems with users not having javascript available. I would
probably do client side validation, but I would certainly have the server
side as backup.

To see what low vision users see when they look at your site, run it
though ADesigner <http://www.alphaworks.ibm.com/tech/adesigner>, or
<http://www.vischeck.com/vischeck/> Visicheck (online tester). The
results might be "eye opening".

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 22 '05 #14

P: n/a
Responses inline.

"Roland Hall" <nobody@nowhere> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
"Chris Hohmann" <no****@thankyou.com> wrote in message
news:u$**************@TK2MSFTNGP14.phx.gbl...
:
: "Roland Hall" <nobody@nowhere> wrote in message
: news:ee**************@TK2MSFTNGP15.phx.gbl...
: > "Adrienne" wrote in message
: > news:Xn****************************@207.115.63.158 ...
: > : Gazing into my crystal ball I observed Adrienne
: > : <ar********@sbcglobal.net> writing in
: > : news:Xn***************************@207.115.63.158:
: > :
: > : > Gazing into my crystal ball I observed "Roland Hall"
<nobody@nowhere>
: > : > writing in news:#q**************@TK2MSFTNGP10.phx.gbl:
: > : >
: > : >> "Adrienne" wrote in message
: > : >> news:Xn***************************@207.115.63.158. ..
: > : >>: Gazing into my crystal ball I observed "Roland Hall"
: <nobody@nowhere>
: > : >>: writing in news:uT**************@TK2MSFTNGP15.phx.gbl:
: > : >>:
: > : >>: > "Vinod" <vi***@erivasystems.com> wrote in message
: > : >>: > news:%2****************@tk2msftngp13.phx.gbl...
: > : >>: >: I have got a peculiar requirement. I want to distinquish
between
: > : >>: >: the color codes.
: > : >>: >:
: > : >>: >: I have got two text fields and i will enter the color codes
: there.
: > : >>: >: The first text field will have background color
: > : >>: >: The second will have text color.
: > : >>: >:
: > : >>: >: I want to validate if background color is dark then only light : > : >>: >: colors should be entered in text.
: > : >>: >: and vice versa.
: > : >>: >:
: > : >>: >: any solutions will be great help.
: > : >>: >
: > : >>: > You can use the DOM on the client-side to determine what the
: > : >>: > current background color is but this is not an ASP issue.
: > : >>: >
: > : >>:
: > : >>: I don't think the OP wants that. I think he's saying if someone
: puts
: > : >>: # 000000 in one box, they can't put #666666 in the other box.
: > : >>: Color codes:
: > : >>: <http://webmonkey.wired.com/webmonkey/reference/color_codes/>
: > : >>
: > : >> I realize what he's asking for. He has to determine what the
: > : >> background color is so he can contrast the foreground color with
it.
: > : >> AND, it's a client-side issue, not an ASP one.
: > : >>
: > : >
: > : > Actually, we really don't know if it's client side or not.
: > : >
: > : ><% dim background
: > : > dim foreground
: > : > dim nocontrast
: > : >
: > : >
: > : > background = request.form("background")
: > : > foreground = request.form("foreground")
: > : >
: > : > 'some kind of function to determine whether the colors contrast
enough
: > : > if nocontrast = true then
: > : > response.write "There is not enough contrast"
: > : > end if
: > : > %>
: > : ><form method="post" action="">
: > : ><label for="background">Background: </label>
: > : ><select name="background" id="background">
: > : ><option value="000000" style="background-color:#000;
: color:#fff">#000000
: > : ></option> <option value="c0c0c0" style="background-color:#c0c0c0;
: > : > color:#fff">#c0c0c0 </option> </select> <label
: > : > for="foreground">Foreground:
: > : ></label> <select name="foreground" id="foregound">
: > : ><option value="000000" style="background-color:#000;
: color:#fff">#000000
: > : ></option> <option value="c0c0c0" style="background-color:#c0c0c0;
: > : > color:#fff">#c0c0c0 </option> </select>
: > : >
: > : ><input type="submit" value="Submit"> </form>
: > : >
: > : > Might be useful for someone trying to determine color blindness.
: > :
: > : The OP emailed me:
: > :
: > : >you got the problem right. I will tell the scenario also i am
building
: a
: > : >website where the users can choose there
: > : >own color combinations.so when the user selects a color and if it is : > : >bright
: > : >color say he has selected the background color then the next
selection
: > : >should be
: > : >light color so that the combination looks good,
: > :
: > : I guess not everyone reads signatures.
: >
: > Not to mention he said, "the users can choose..." Can't do that from
the
: > server-side. The user selects a color and he wants to provide a
: contrasting
: > color for the foreground. The server doesn't need to see color is the
: point
: > I was trying to make nor can it determine what color the user chose
unless
: > it is posted. However, with his email to you, it appears he doesn't
want
: > any server-side. The user will be doing it on their end. How will they : > read his message to them that the colors do not contrast? Perhaps he
will
: > use black/white, which he could just do anyway and eliminate the issue. : >
: > If the user is selecting color contrast that is best for them, they can do
: > that with their browser and override his settings. If they have trouble : > seeing, they're most likely doing it already or they are using something : > else to help them, like text-speech.
: >
: > --
: > Roland Hall
: > /* This information is distributed in the hope that it will be useful,
but
: > without any warranty; without even the implied warranty of
merchantability
: > or fitness for a particular purpose. */
: > Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
: > WSH 5.6 Documentation -
: http://msdn.microsoft.com/downloads/list/webdev.asp
: > MSDN Library - http://msdn.microsoft.com/library/default.asp
: >
: >
: I think you're still misinterpreting the OP's original intent. As I
: understand it, he has a form with two (2) text fields where the end user
can
: enter color codes (e.g. #FFFFFF, #000000, etc..). One for background, one : for foreground. On the server-side, when these color codes are submitted, : the difference between their brightness levels is calculated. If the
: difference is above a specified threshold, then the color code values are : stored (perhaps in a database), if not the user is redirected to a page
that
: indicates there is insufficient contrast between the foreground and
: background colors specified. I don't think there's any client-side going
on
: in this scenario. I imagine this is for some skinning/personalization
: functionality on the website.

I'm willing to concede I'm missing it but I don't see how you get that out
of this statement:

"I want to validate if background color is dark then only light colors
should be entered in text. and vice versa."
I'm not basing my interpretation on the above statement, I'm basing it on
this one:

"I have got two text fields and i will enter the color codes there."

"I want to validate if background is dark." Following your conclusion, the value has already been selected.
No, following my conclusion both the background color code and the
foreground color code are sent at the same time.

"THEN only light colors should be entered in text." The user is entering
the text, or selecting from a list, but can only enter/select colors that
are in contrast with the background they have already chosen. To me, this
means the options have changed based on the first input and the webmaster
wants to be in control of those options, not the user.
I don't believe "THEN" in this context is chronilogical. I take it be closer
to the logical equivalent of implication (IF P THEN Q).

"and vice versa." This means, to me, if background first, foreground
options are based upon that color. If foreground color is selected, then
background options are based upon that color.
No, I think this means that given two color codes, B and F, you need to
check whether B is not light enough compared to F and also whether B is not
dark enough compared to F.

His email to Adrienne, parallels what I just wrote.
No it doesn't. The first line from hthe quoted email indicates that Adrienne
got it right, which is the scenario I described.

you got the problem right. I will tell the scenario also i am building a
website where the users can choose there
own color combinations.so when the user selects a color and if it is
bright
color say he has selected the background color then the next selection
should be
light color so that the combination looks good,


This could be a simple list or numerous rectangles/squares on a page of

the color they selected with all of the available options for the contrasting
color for the text. The user could then select the one they want and THIS
could then be added to a database.
That's one way to approach it, but I don't believe that's what's being
described here.

I think I've actually seen this somewhere before and it was done all
client-side. It could be done server-side but I think it would be a waste
to do so. We may have to agree to disagree on this one because I just can't see his comments as anything else.
Some users have client-side scripting disabled.
One last thing, why would the user be directed to a page informing them
their selections are inadequate for contrast? Who the Hell is looking at
this anyway? Isn't it the user? If it's their skinning/personalization
option, then why is the webmaster trying to decide for them? I think the OP just wants to help the user choose the colors that work best together by
letting them know what the available color options are that would contrast
the most for a better viewing experience. However, I think the OP, while
offering these choices, should not only allow the user to choose a
predetermined pair but also choose any colors they want. Some may like
orange on red. Who am I to deny them that choice? Sounds like fish on
Fridays to me. (O:=


The site may contain important information. Issurring that the textual
information is legible/visible by restricting the color pallette
combinations is not unreasonable.

Jul 22 '05 #15

P: n/a
"Adrienne" wrote in message
news:Xn****************************@207.115.63.158 ...
: Gazing into my crystal ball I observed "Roland Hall" <nobody@nowhere>
: writing in news:#H**************@TK2MSFTNGP14.phx.gbl:
:
: > One last thing, why would the user be directed to a page informing them
: > their selections are inadequate for contrast? Who the Hell is looking
: > at this anyway? Isn't it the user? If it's their
: > skinning/personalization option, then why is the webmaster trying to
: > decide for them? I think the OP just wants to help the user choose the
: > colors that work best together by letting them know what the available
: > color options are that would contrast the most for a better viewing
: > experience. However, I think the OP, while offering these choices,
: > should not only allow the user to choose a predetermined pair but also
: > choose any colors they want. Some may like orange on red. Who am I to
: > deny them that choice? Sounds like fish on Fridays to me.
:
: With an increasing awareness of accessibility issues, designers and
: developers are becoming more aware of colors. What you might be able to
: see, someone with low vision cannot.

I would agree with that.

: If one is offering a service where users can create web pages on the fly,
: and they choose the background and foreground colors, then it would be
: nice to remind the user that certain colors do not have enough contrast
: for low vision visitors (not to mention tiny font sizes in pixels that
: can't be resized).

Nothing wrong with reminders. IMHO, I believe they should be pre, not post
submit. However, removing the option is called Liberalism. There are no
options because someone might be offended.

: The good thing about doing the validation server side is that you do not
: run into problems with users not having javascript available.

Ah, yes. (using my best W.C.Fields voice) the ole' turning off of the
client-scripting engine as a security measure rather than educating ones
self. Perhaps next we will be removing images and then possibly not using
the Internet because it really isn't safe to be here?! I believe
server-side scripting should be performed but not in lieu of client-side
scripting which can save me trips to the server but rather in addition to
for those little buggers that have more time on their hands than sense to
mess with my servers (see unmonitored children)

: I would
: probably do client side validation, but I would certainly have the server
: side as backup.

No comment (see redundant)

: To see what low vision users see when they look at your site, run it
: though ADesigner <http://www.alphaworks.ibm.com/tech/adesigner>, or
: <http://www.vischeck.com/vischeck/> Visicheck (online tester). The
: results might be "eye opening".

Considering I just posted a whole slew of links that refer to the same
subject, probably not, but do I fail to consider these people in my coding.
Yes, but I am more of a developer than a designer so I'm not fond of a lot
of different colors, especially ones that do not contrast well with the
background although I have been known to use #efe on a white background
quite a bit. I just took that out of my latest product. And, if images are
used, they're simple and used more as a marker for a target, rather than
being the target.

I have astigmatism http://www.allaboutvision.com/condit...stigmatism.htm
in both eyes, worse in my left. Without glasses, I see two of everything.
To me, it's just blurry because the two images are very close together. It
effects the amount of light I take in so anything written in lights, like
signs, monitors, television, etc. are hard to view without glasses. I find
myself squinting even when I don't need to. Probably a uncontrollable need
to focus. Glasses keep this from occurring. I actually have pretty good
eyesight. There are just 1 too many pictures coming in. Actually that is
an incorrect statement. 2 pictures are coming but they're not synchronized.

This last one I posted, I read almost every one of them this morning.
http://www.colorsystem.com/ It appears we are still adopting a best guess
without a definite approach to colors. I think it was Plato's color system
from his Timaios where he believed the eye does not receive light but rather
it transmits a ray of vision towards an object. He might have been
projecting something but it wasn't a vision. Perhaps that can be applied to
the brain where an image is seen where none exists. But then, how do we
really know everything we see really does exist?

Out of all I read at this site, this was the statement that got most of my
attention. "In a reality so rich with colours, there are in reality no
colours." You'll have to excuse his typos, he's obviously in the UK. (O:=
I had often wondered if what I see is what someone else sees. It goes on to
state that the amount of light that enters our eyes affects the colors we
see. The author states we perceive colors within our brain so they are a
product of our self and we decorate our personal world with them. I find
that fascinating. It is said that dogs see 2 -dimensional and are mostly
color blind while we see 3-dimensional and see colors. This is based on the
cells in the eye, the retina I think, where humans have cone shaped cells
and dogs have something else. That adds weight to the argument what I see
is not what you see. Perhaps Science has figured out what each of us sees
is close enough to what the other sees but not exactly. I have never heard
of anything that can modify the colors I see, meaning all colors, not a
filter to omit a color, etc. Corrective eyeware is not for color but rather
for light and malformations which effect focus at different distances.
Ironically, these articles discuss methods and formulas to help someone use
contrasting colors to aid those who cannot distinguish as well as most with
the contrast in colors, or focus well with small print, by doing this on a
computer, which is the device that actually makes it harder to see.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #16

P: n/a
"Chris Hohmann" wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
: > "I want to validate if background color is dark then only light colors
: > should be entered in text. and vice versa."
:
: I'm not basing my interpretation on the above statement, I'm basing it on
: this one:
:
: "I have got two text fields and i will enter the color codes there."

and then he clarified. Is the sum of the parts greater than the sum of the
whole?

: > "I want to validate if background is dark." Following your conclusion,
: the
: > value has already been selected.
:
: No, following my conclusion both the background color code and the
: foreground color code are sent at the same time.

No I'm wrong or no you disagree or both? Isn't that counterproductive?
That's like guessing. Why not give all options up front so the user chooses
once, instead of multiple times?

Pick a background and foreground color.
Done.
Nah, I didn't like that, try again.
Done.
Nope. Not gonna' get it. Choose again.
Done.
You're not really catching onto this are ya'? Try again.
Done.
Man, you suck. Can you even make out the text on this page? Choose again,
and Indiana, choose wisely. While the true grail can give you eternal life,
the false grail will take it from you.
Done.
Poof! Silly German, you're toast. hehe I warned ya'. NEXT!!!!!

: > "THEN only light colors should be entered in text." The user is
entering
: > the text, or selecting from a list, but can only enter/select colors
that
: > are in contrast with the background they have already chosen. To me,
this
: > means the options have changed based on the first input and the
webmaster
: > wants to be in control of those options, not the user.
:
: I don't believe "THEN" in this context is chronilogical. I take it be
closer
: to the logical equivalent of implication (IF P THEN Q).

Skinny dipping in Egypt? Ah, implication, like (IF P THEN SHAKE)

: > "and vice versa." This means, to me, if background first, foreground
: > options are based upon that color. If foreground color is selected,
then
: > background options are based upon that color.
:
: No, I think this means that given two color codes, B and F, you need to
: check whether B is not light enough compared to F and also whether B is
not
: dark enough compared to F.

But, I think he wants to get to this point, so only good options are
available.

: > His email to Adrienne, parallels what I just wrote.
:
: No it doesn't. The first line from hthe quoted email indicates that
Adrienne
: got it right, which is the scenario I described.

IYO. Since when does an apple = an orange?

: > >you got the problem right. I will tell the scenario also i am building
a
: > >website where the users can choose there
: > >own color combinations.so when the user selects a color and if it is
: > >bright
: > >color say he has selected the background color then the next selection
: > >should be
: > >light color so that the combination looks good,

Perhaps you're still only using parts.. "WHEN the user selects...THEN the
next selection..." HELLO? Is this thing on? Two selections, one following
the other.

: > This could be a simple list or numerous rectangles/squares on a page of
: the
: > color they selected with all of the available options for the
contrasting
: > color for the text. The user could then select the one they want and
THIS
: > could then be added to a database.
:
: That's one way to approach it, but I don't believe that's what's being
: described here.

You're right. It's not being described that way. I think he's looking for
a solution. He only has a final outcome realized and is asking for the path
to get there. IMHO, if he wants the easiest solution for the user, since
his goal is, IMHO, to make their life easier in setting their color
setttings in their profiles for background, foreground, button colors and
links, it would be offer options in either a list or a color wheel, pattern,
atlas, etc.

Background: black
Foreground Options: white, yellow, cyan, etc.

Foreground: Black
Background Options: white, yellow, cyan, light[any color], etc.

These could be SELECTs but a visual of all examples would make it eaiser for
the user. The guess has thus been removed and no reason to make a decision
more than once unless you just change your mind, like women.

While this is what I'm referring to:
http://wellstyled.com/tools/colorscheme2/index-en.html

I think he can make a list of light colors and a list of dark colors. When
the user selects one from one list for background, then links text, button
colors should only be offered from the other list. That may be too simple.

: > I think I've actually seen this somewhere before and it was done all
: > client-side. It could be done server-side but I think it would be a
waste
: > to do so. We may have to agree to disagree on this one because I just
: can't
: > see his comments as anything else.
:
: Some users have client-side scripting disabled.

Some users don't get much use out of the net. Some users don't use IE to
browse. Most of these users still read all their mail in RTF or HTML
embedded format. In the immortal words of Ricky Ricardo, "I dunt."

I, on the other hand, don't depend on my browser to be my only level of
security. I manage my security where nothing runs without my ok and move
sites I trust, into different zones. Granted I am slightly above the
average user level. While educating the user may take time, it takes longer
to educate them with stupidity and/or paranoia.

: > One last thing, why would the user be directed to a page informing them
: > their selections are inadequate for contrast? Who the Hell is looking
at
: > this anyway? Isn't it the user? If it's their skinning/personalization
: > option, then why is the webmaster trying to decide for them? I think
the
: OP
: > just wants to help the user choose the colors that work best together by
: > letting them know what the available color options are that would
contrast
: > the most for a better viewing experience. However, I think the OP,
while
: > offering these choices, should not only allow the user to choose a
: > predetermined pair but also choose any colors they want. Some may like
: > orange on red. Who am I to deny them that choice? Sounds like fish on
: > Fridays to me. (O:=
:
: The site may contain important information. Issurring that the textual
: information is legible/visible by restricting the color pallette
: combinations is not unreasonable.

If the message were more important than the visual experience, then the
options would not be made available or shouldn't be. If it were notes from
a CIA operative, I'm sure it would be black and white... second thought, it
might be black on black. (O:=

We can still agree to disagree.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #17

P: n/a
responses inline

"Roland Hall" <nobody@nowhere> wrote in message
news:ep**************@TK2MSFTNGP12.phx.gbl...
"Chris Hohmann" wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
: > "I want to validate if background color is dark then only light colors
: > should be entered in text. and vice versa."
:
: I'm not basing my interpretation on the above statement, I'm basing it on : this one:
:
: "I have got two text fields and i will enter the color codes there."

and then he clarified. Is the sum of the parts greater than the sum of the whole?
No, the sum of the parts is not greater than the sum of the whole. To my
understanding, his clarification (you word not mine) was simply a
description of what the OP wanted to accomplish on the server-side once he
hade recieved both color codes.
: > "I want to validate if background is dark." Following your conclusion, : the
: > value has already been selected.
:
: No, following my conclusion both the background color code and the
: foreground color code are sent at the same time.

No I'm wrong or no you disagree or both? Isn't that counterproductive?
That's like guessing. Why not give all options up front so the user chooses once, instead of multiple times?
Both, you're wrong and I disagree. No, server-side validation is not
counterproductive. Client-side validation can/should be used for augment
server-side validation, not the other way around.

Pick a background and foreground color.
Done.
Nah, I didn't like that, try again.
Done.
Nope. Not gonna' get it. Choose again.
Done.
You're not really catching onto this are ya'? Try again.
Done.
Man, you suck. Can you even make out the text on this page? Choose again, and Indiana, choose wisely. While the true grail can give you eternal life, the false grail will take it from you.
Done.
Poof! Silly German, you're toast. hehe I warned ya'. NEXT!!!!!
I'm not sure what you're argument is here. Are you arguing against any
restrictions on color pallette? Or are you arguing that it should only be
done client-side? Or is your argument something else entirely?

: > "THEN only light colors should be entered in text." The user is
entering
: > the text, or selecting from a list, but can only enter/select colors
that
: > are in contrast with the background they have already chosen. To me,
this
: > means the options have changed based on the first input and the
webmaster
: > wants to be in control of those options, not the user.
:
: I don't believe "THEN" in this context is chronilogical. I take it be
closer
: to the logical equivalent of implication (IF P THEN Q).

Skinny dipping in Egypt? Ah, implication, like (IF P THEN SHAKE)
I have no idea what you're talking about here.

: > "and vice versa." This means, to me, if background first, foreground
: > options are based upon that color. If foreground color is selected,
then
: > background options are based upon that color.
:
: No, I think this means that given two color codes, B and F, you need to
: check whether B is not light enough compared to F and also whether B is
not
: dark enough compared to F.

But, I think he wants to get to this point, so only good options are
available.

This is where our intepretations diverge. You think he's describing a two
step process, I don't.

: > His email to Adrienne, parallels what I just wrote.
:
: No it doesn't. The first line from hthe quoted email indicates that
Adrienne
: got it right, which is the scenario I described.

IYO. Since when does an apple = an orange?
An apple does not equal an orange. The first line of the quoted email says
the following:

"[Adrienne] you got the problem right."

Adrienne's solution was a form with two (2) select controls, one for
foreground color code and one for background color code. This is consistent
with a scenario where both color codes are submitted at the same time. It is
also in direct opposition to your two phase interpretation.

: > >you got the problem right. I will tell the scenario also i am building a
: > >website where the users can choose there
: > >own color combinations.so when the user selects a color and if it is
: > >bright
: > >color say he has selected the background color then the next selection : > >should be
: > >light color so that the combination looks good,

Perhaps you're still only using parts.. "WHEN the user selects...THEN the
next selection..." HELLO? Is this thing on? Two selections, one following the other.
No, I'm using the whole thing. While the grammar is poor, I believe the OP
meant "when the user selects... then the OTHER selection..." Hello. Yes,
this thing is on. No, two selections, submitted simultaneously as indicated
by the quoted email and Adrienne's posted form code.

: > This could be a simple list or numerous rectangles/squares on a page of : the
: > color they selected with all of the available options for the
contrasting
: > color for the text. The user could then select the one they want and
THIS
: > could then be added to a database.
:
: That's one way to approach it, but I don't believe that's what's being
: described here.

You're right. It's not being described that way. I think he's looking for a solution. He only has a final outcome realized and is asking for the path to get there. IMHO, if he wants the easiest solution for the user, since
his goal is, IMHO, to make their life easier in setting their color
setttings in their profiles for background, foreground, button colors and
links, it would be offer options in either a list or a color wheel, pattern, atlas, etc.

Background: black
Foreground Options: white, yellow, cyan, etc.

Foreground: Black
Background Options: white, yellow, cyan, light[any color], etc.

These could be SELECTs but a visual of all examples would make it eaiser for the user. The guess has thus been removed and no reason to make a decision more than once unless you just change your mind, like women.
What you feel, IYHO, is the easiest solution for the user is beside the
point. You're original assertion was that "it's a
client-side issue, not an ASP one." This assestion was wrong. The OP was in
fact looking for a way to validate background/foreground color codes on the
server-side.

While this is what I'm referring to:
http://wellstyled.com/tools/colorscheme2/index-en.html

I think he can make a list of light colors and a list of dark colors. When the user selects one from one list for background, then links text, button
colors should only be offered from the other list. That may be too simple.

It is too simple. But more importantly, it's besides the point.

: > I think I've actually seen this somewhere before and it was done all
: > client-side. It could be done server-side but I think it would be a
waste
: > to do so. We may have to agree to disagree on this one because I just
: can't
: > see his comments as anything else.
:
: Some users have client-side scripting disabled.

Some users don't get much use out of the net. Some users don't use IE to
browse. Most of these users still read all their mail in RTF or HTML
embedded format. In the immortal words of Ricky Ricardo, "I dunt."
Can you site the source for the above assertion? Despite your personal
browser setting preferences, the OP may in fact need concern himslef with
users who have javascript disabled.

I, on the other hand, don't depend on my browser to be my only level of
security. I manage my security where nothing runs without my ok and move
sites I trust, into different zones. Granted I am slightly above the
average user level. While educating the user may take time, it takes longer to educate them with stupidity and/or paranoia.
Congratulations. I'd be interested to learn what you feel is stupid and/or
paranoid about disabling javascript.

: > One last thing, why would the user be directed to a page informing them : > their selections are inadequate for contrast? Who the Hell is looking
at
: > this anyway? Isn't it the user? If it's their skinning/personalization : > option, then why is the webmaster trying to decide for them? I think
the
: OP
: > just wants to help the user choose the colors that work best together by : > letting them know what the available color options are that would
contrast
: > the most for a better viewing experience. However, I think the OP,
while
: > offering these choices, should not only allow the user to choose a
: > predetermined pair but also choose any colors they want. Some may like : > orange on red. Who am I to deny them that choice? Sounds like fish on : > Fridays to me. (O:=
:
: The site may contain important information. Issurring that the textual
: information is legible/visible by restricting the color pallette
: combinations is not unreasonable.

If the message were more important than the visual experience, then the
options would not be made available or shouldn't be. If it were notes from a CIA operative, I'm sure it would be black and white... second thought, it might be black on black. (O:=
A balance can be struck between legibility and personalization. One tool
useful in insuring this balance is a discreet set of high contrast
pallettes.

We can still agree to disagree.
No, we can't.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp MSDN Library - http://msdn.microsoft.com/library/default.asp

Jul 22 '05 #18

P: n/a
"Chris Hohmann" wrote in message
news:Ow**************@TK2MSFTNGP12.phx.gbl...
: responses inline
: No, the sum of the parts is not greater than the sum of the whole. To my
: understanding, his clarification (you word not mine) was simply a
: description of what the OP wanted to accomplish on the server-side once he
: hade recieved both color codes.

Funny, I thought the object was to help and educate, just just provide an
answer. However, to each his own.

: Both, you're wrong and I disagree. No, server-side validation is not
: counterproductive. Client-side validation can/should be used for augment
: server-side validation, not the other way around.

Well, then the discussion is over. We're not debating the same subject.
I'm stating what I think is best for the user, since the goal is to make it
easy for the user. You're trying to provide an answer which will not make
it easy for the user. If the user has to choose a color scheme more than
once just to please the webmaster, then it's a waste of time to even offer
it. Would you want to keep picking colors until you got it right?

: I'm not sure what you're argument is here. Are you arguing against any
: restrictions on color pallette? Or are you arguing that it should only be
: done client-side? Or is your argument something else entirely?

Something else entirely.

: I have no idea what you're talking about here.

That seems to be the topic of discussion.

: This is where our intepretations diverge. You think he's describing a two
: step process, I don't.

I have spent years providing solutions for my customers. If I had given
them what they asked for, based on their knowledge, none of them would have
been happy. I believe it to be beneficial to inform them of the
possibilities so their choices are not limited.

: An apple does not equal an orange. The first line of the quoted email says
: the following:
:
: "[Adrienne] you got the problem right."
:
: Adrienne's solution was a form with two (2) select controls, one for
: foreground color code and one for background color code. This is
consistent
: with a scenario where both color codes are submitted at the same time. It
is
: also in direct opposition to your two phase interpretation.

Chris... two select controls is two, not one. When you select one, the
other list changes based on the choice of the first. If he only lists the
same colors in both lists and wants to evaluate it after they make a
selection to see if he will allow it, that's ridiculous. That is similar to
saying, "If you choose 1-10 on the first list, you need to pick 11-20 on the
second list. Then he gives them the choice of 1-20 on both lists and if the
user picks on the second 1-10, he reports and error and asks them to do it
again. However, if he only offers 11-20 once a color between 1-10 is
selected on the first list, he has actually helped the user instead of
wasting their time. I can't make it any clearer than that.

: No, I'm using the whole thing. While the grammar is poor, I believe the OP
: meant "when the user selects... then the OTHER selection..." Hello. Yes,
: this thing is on. No, two selections, submitted simultaneously as
indicated
: by the quoted email and Adrienne's posted form code.

I'm discussing options before the post and you're arguing the post is a
single task.

: What you feel, IYHO, is the easiest solution for the user is beside the
: point. You're original assertion was that "it's a
: client-side issue, not an ASP one." This assestion was wrong. The OP was
in
: fact looking for a way to validate background/foreground color codes on
the
: server-side.

The OP stated type in, not select. Adrienne said select. The OP may not
know javascript but as you say, if the user has it turned off, then that
won't work. I don't disagree with that but then the user should pick a
color and submit. Then a list will be offered with only the colors that
will work well with that first color they chose. That makes sense.

To choose two colors and then be told, choose again because the webmaster
doesn't think that is a good combination, could leave the user selecting
over an over. If the original goal is to help the user, how did the user
benefit from that scenario?

: It is too simple. But more importantly, it's besides the point.

I know. The point is control the user without telling them the rules and
then keep them guessing until they get it right. Got it.

: Can you site the source for the above assertion? Despite your personal
: browser setting preferences, the OP may in fact need concern himslef with
: users who have javascript disabled.

We can guess all day long or the OP can join in.

: > I, on the other hand, don't depend on my browser to be my only level of
: > security. I manage my security where nothing runs without my ok and
move
: > sites I trust, into different zones. Granted I am slightly above the
: > average user level. While educating the user may take time, it takes
: longer
: > to educate them with stupidity and/or paranoia.
:
: Congratulations. I'd be interested to learn what you feel is stupid and/or
: paranoid about disabling javascript.

You've misinterpreted everything else I've said so why should this be any
different.

Which part of this implies what you just said?

: > I, on the other hand, don't depend on my browser to be my only level of
: > security.

I think it is stupid and paranoid to disable javascript and think by doing
that, you're secure. I think it is stupid to think because you have a
firewall, you're protected. I have this argument over and over again with
those who are primarily developers. They think because they can program in
a particular language, they know everything about network and network
security. I wouldn't give most of them a C+ at the application level alone.
Knowing how to defend attacks against your code does not protect your box,
your router, your wire, your interconnectivity or your users.
:
: A balance can be struck between legibility and personalization. One tool
: useful in insuring this balance is a discreet set of high contrast
: pallettes.

I can't believe you just suggested what I've been saying and not realize it.

: > We can still agree to disagree.
:
: No, we can't.

Well, that's where I'm leaving it. I'm tired of repeating myself as you're
probably tired of reading it. If you feel the need to respond, go ahead but
I'm done with this thread. I'm here to participate, learn and help where I
can. If I am told I'm missing it and I'm wrong, then obviously I'm not
helping.

Thanks for the discussion.

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
Jul 22 '05 #19

P: n/a
Responses inline.

"Roland Hall" <nobody@nowhere> wrote in message
news:OL**************@TK2MSFTNGP12.phx.gbl...
"Chris Hohmann" wrote in message
news:Ow**************@TK2MSFTNGP12.phx.gbl...
: responses inline
: No, the sum of the parts is not greater than the sum of the whole. To my
: understanding, his clarification (you word not mine) was simply a
: description of what the OP wanted to accomplish on the server-side once he : hade recieved both color codes.

Funny, I thought the object was to help and educate, just just provide an
answer. However, to each his own.
The object is to help and educate. That's difficult to do when you tell the
OP that his question is a client-side issue. This is a newsgroup concerning
itself with a server-side technology. You statement was tantamount to
telling the OP that he didn't belong here and that he should seek his answer
elsewhere.

: Both, you're wrong and I disagree. No, server-side validation is not
: counterproductive. Client-side validation can/should be used for augment
: server-side validation, not the other way around.

Well, then the discussion is over. We're not debating the same subject.
I'm stating what I think is best for the user, since the goal is to make it easy for the user. You're trying to provide an answer which will not make
it easy for the user. If the user has to choose a color scheme more than
once just to please the webmaster, then it's a waste of time to even offer
it. Would you want to keep picking colors until you got it right?
The discussion was over quite some time ago. You're correct, we are no
longer debating the same subject. You've deftly steered the debate to the
merits of client-side validation, while I stubbornly refuse to budge from
the original debate. Namely, that the OP's original question was and
continues to be a server-side validation issue, contrary to your prior
assertion that it was a client-side issue. I'd be happy to move on to a
debate on the merits of client-side validation once the original issue has
been settled. I imagine the debate would be brief as I have no problems with
client-side validation, so long as it is an augmentation of server-side
validation.

: I'm not sure what you're argument is here. Are you arguing against any
: restrictions on color pallette? Or are you arguing that it should only be : done client-side? Or is your argument something else entirely?

Something else entirely.
Thanks for clarifying.

: I have no idea what you're talking about here.

That seems to be the topic of discussion.
No, witty banter aside, the topic of discussion was validating contrast
levels of color codes.

: This is where our intepretations diverge. You think he's describing a two : step process, I don't.

I have spent years providing solutions for my customers. If I had given
them what they asked for, based on their knowledge, none of them would have been happy. I believe it to be beneficial to inform them of the
possibilities so their choices are not limited.
Good for you.

: An apple does not equal an orange. The first line of the quoted email says : the following:
:
: "[Adrienne] you got the problem right."
:
: Adrienne's solution was a form with two (2) select controls, one for
: foreground color code and one for background color code. This is
consistent
: with a scenario where both color codes are submitted at the same time. It is
: also in direct opposition to your two phase interpretation.

Chris... two select controls is two, not one. When you select one, the
other list changes based on the choice of the first. If he only lists the
same colors in both lists and wants to evaluate it after they make a
selection to see if he will allow it, that's ridiculous. That is similar to saying, "If you choose 1-10 on the first list, you need to pick 11-20 on the second list. Then he gives them the choice of 1-20 on both lists and if the user picks on the second 1-10, he reports and error and asks them to do it
again. However, if he only offers 11-20 once a color between 1-10 is
selected on the first list, he has actually helped the user instead of
wasting their time. I can't make it any clearer than that.
Roland... you're correct, two select controls are two, not one. And once
server-side validation is put in place to verify those two color codes have
a sufficient contrast level, I'd be happy to entertain the idea of
implementing client-side validation. But only as an augmentation to the
existing server-side validation.

: No, I'm using the whole thing. While the grammar is poor, I believe the OP : meant "when the user selects... then the OTHER selection..." Hello. Yes,
: this thing is on. No, two selections, submitted simultaneously as
indicated
: by the quoted email and Adrienne's posted form code.

I'm discussing options before the post and you're arguing the post is a
single task.
I'm arguing that the OP's original question is in fact a server-side issue
which can and should be addressed there. Once the server-side validation is
accomplished the OP is free to implement additional client-side validations
as he sees fit. If fact, I would encourage that he do so and seek advise on
the matter in an appropriate client-side forum.

: What you feel, IYHO, is the easiest solution for the user is beside the
: point. You're original assertion was that "it's a
: client-side issue, not an ASP one." This assestion was wrong. The OP was
in
: fact looking for a way to validate background/foreground color codes on
the
: server-side.

The OP stated type in, not select. Adrienne said select. The OP may not
know javascript but as you say, if the user has it turned off, then that
won't work. I don't disagree with that but then the user should pick a
color and submit. Then a list will be offered with only the colors that
will work well with that first color they chose. That makes sense.
Your two phase process may make sense, but it does not eliminate the need
for server-side validation nor is it in line with how the problem was
originally describe, i.e.. with two color code controls on the same form.

To choose two colors and then be told, choose again because the webmaster
doesn't think that is a good combination, could leave the user selecting
over an over. If the original goal is to help the user, how did the user
benefit from that scenario?
The user benefited by being informed that his color selections would make
text illegible. If the OP feels the user needs further assistance, he's free
to implement whatever response to invalid color combinations he deems
sufficient. It does not change the fact that, at a minimum, validation
should occur at the server.
: It is too simple. But more importantly, it's besides the point.

I know. The point is control the user without telling them the rules and
then keep them guessing until they get it right. Got it.
No, that's not the point. No, you didn't get it.

: Can you site the source for the above assertion? Despite your personal
: browser setting preferences, the OP may in fact need concern himslef with : users who have javascript disabled.

We can guess all day long or the OP can join in.
Yes, those are two viable options. But it does not answer the question.

: > I, on the other hand, don't depend on my browser to be my only level of : > security. I manage my security where nothing runs without my ok and
move
: > sites I trust, into different zones. Granted I am slightly above the
: > average user level. While educating the user may take time, it takes
: longer
: > to educate them with stupidity and/or paranoia.
:
: Congratulations. I'd be interested to learn what you feel is stupid and/or : paranoid about disabling javascript.

You've misinterpreted everything else I've said so why should this be any
different.

Which part of this implies what you just said?

: > I, on the other hand, don't depend on my browser to be my only level of : > security.
That part doesn't. This part does...
"While educating the user may take time, it takes longer to educate them
with stupidity and/or paranoia."

You also state it in the very next line below.

I think it is stupid and paranoid to disable javascript and think by doing
that, you're secure. I think it is stupid to think because you have a
firewall, you're protected. I have this argument over and over again with
those who are primarily developers. They think because they can program in a particular language, they know everything about network and network
security. I wouldn't give most of them a C+ at the application level alone. Knowing how to defend attacks against your code does not protect your box,
your router, your wire, your interconnectivity or your users.
:
: A balance can be struck between legibility and personalization. One tool
: useful in insuring this balance is a discreet set of high contrast
: pallettes.

I can't believe you just suggested what I've been saying and not realize it.

No need to believe it, it's not true. I'm not suggesting what you've been
saying. I'm suggesting that the OP's original question was a server-side
issue, not a client-side issue as you assert. As such, it was posted to an
appropriate forum and deserves our attention.

: > We can still agree to disagree.
:
: No, we can't.

Well, that's where I'm leaving it. I'm tired of repeating myself as you're probably tired of reading it. If you feel the need to respond, go ahead but I'm done with this thread. I'm here to participate, learn and help where I can. If I am told I'm missing it and I'm wrong, then obviously I'm not
helping.
Please reconsider. Take the weekend to rest up, then we can start arguing
again on Monday. I am tire of reading this thread, so I could use the rest
as well. I don't doubt you good intentions, just the effects. You are
missing it, you are wrong and you're not helping, but it takes a big man to
admit it. You are to be commended. You're a bigger man than I.

Thanks for the discussion.


You're welcome.
Jul 22 '05 #20

This discussion thread is closed

Replies have been disabled for this discussion.