Click here to Skip to main content
15,909,896 members
Home / Discussions / C#
   

C#

 
AnswerRe: Session time Pin
Christian Graus10-Jul-07 1:26
protectorChristian Graus10-Jul-07 1:26 
QuestionCrystal Report Error Pin
Syed Shahid Hussain10-Jul-07 0:15
Syed Shahid Hussain10-Jul-07 0:15 
QuestionColor Managment Pin
Stevo Z10-Jul-07 0:12
Stevo Z10-Jul-07 0:12 
AnswerRe: Color Managment Pin
Christian Graus10-Jul-07 1:23
protectorChristian Graus10-Jul-07 1:23 
GeneralRe: Color Managment Pin
Stevo Z10-Jul-07 1:42
Stevo Z10-Jul-07 1:42 
AnswerRe: Color Managment Pin
Luc Pattyn10-Jul-07 1:30
sitebuilderLuc Pattyn10-Jul-07 1:30 
GeneralRe: Color Managment Pin
Stevo Z10-Jul-07 1:39
Stevo Z10-Jul-07 1:39 
GeneralRe: Color Managment Pin
Luc Pattyn10-Jul-07 2:20
sitebuilderLuc Pattyn10-Jul-07 2:20 
Hi,

the way .NET calculates brightness gives about 0.5f for those colors
that have the three RGB components equal two one or two zero values
and two or one 255 values (that is red, green, blue, cyan, magenta, yellow).

For some of these colors you definitely want black foreground, for some it
is more or less undecided. I suggest you use Black for brightness (not luminance!)
above 0.4f or 0.45f

Alternatively you can calculate a fake brightness (in range 0-765) by
adding the RGB components of the background;
if that exceeds say 500 choose black, otherwise white.

This results in black foreground for cyan, magenta, yellow backgrounds (sum 510),
but white for red, green and blue (sum 255).

Smile | :)






GeneralRe: Color Managment Pin
Stevo Z10-Jul-07 3:00
Stevo Z10-Jul-07 3:00 
GeneralRe: Color Managment Pin
Luc Pattyn10-Jul-07 3:11
sitebuilderLuc Pattyn10-Jul-07 3:11 
GeneralRe: Color Managment Pin
Stevo Z10-Jul-07 3:45
Stevo Z10-Jul-07 3:45 
Questionabout C# Pin
king2010-Jul-07 0:07
king2010-Jul-07 0:07 
AnswerRe: about C# Pin
king2010-Jul-07 0:12
king2010-Jul-07 0:12 
AnswerRe: about C# Pin
Christian Graus10-Jul-07 1:21
protectorChristian Graus10-Jul-07 1:21 
GeneralRe: about C# Pin
Vikram A Punathambekar10-Jul-07 5:05
Vikram A Punathambekar10-Jul-07 5:05 
AnswerRe: about C# Pin
Chintan.Desai10-Jul-07 2:28
Chintan.Desai10-Jul-07 2:28 
GeneralRe: about C# Pin
Le centriste10-Jul-07 2:41
Le centriste10-Jul-07 2:41 
AnswerRe: about C# Pin
Tony Lambert17-Dec-07 12:47
Tony Lambert17-Dec-07 12:47 
AnswerRe: about C# Pin
PhilDanger10-Jul-07 5:11
PhilDanger10-Jul-07 5:11 
AnswerRe: about C# Pin
Scott Dorman10-Jul-07 7:10
professionalScott Dorman10-Jul-07 7:10 
QuestionRegular Expressions Pin
dub_beat10-Jul-07 0:03
dub_beat10-Jul-07 0:03 
AnswerRe: Regular Expressions Pin
dub_beat10-Jul-07 4:53
dub_beat10-Jul-07 4:53 
GeneralRe: Regular Expressions Pin
Scott Dorman10-Jul-07 7:12
professionalScott Dorman10-Jul-07 7:12 
GeneralRe: Regular Expressions Pin
Jimmanuel10-Jul-07 7:32
Jimmanuel10-Jul-07 7:32 
GeneralRe: Regular Expressions Pin
dub_beat10-Jul-07 22:23
dub_beat10-Jul-07 22:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.