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

C#

 
QuestionRe: Convert color from RGB to Color name Pin
Luc Pattyn14-Oct-10 3:33
sitebuilderLuc Pattyn14-Oct-10 3:33 
AnswerRe: Convert color from RGB to Color name Pin
PIEBALDconsult14-Oct-10 3:41
mvePIEBALDconsult14-Oct-10 3:41 
GeneralRe: Convert color from RGB to Color name Pin
Luc Pattyn14-Oct-10 3:59
sitebuilderLuc Pattyn14-Oct-10 3:59 
AnswerRe: Convert color from RGB to Color name Pin
W Balboos, GHB14-Oct-10 9:38
W Balboos, GHB14-Oct-10 9:38 
GeneralRe: Convert color from RGB to Color name Pin
Keith Barrow14-Oct-10 13:00
professionalKeith Barrow14-Oct-10 13:00 
GeneralRe: Convert color from RGB to Color name Pin
PIEBALDconsult14-Oct-10 16:49
mvePIEBALDconsult14-Oct-10 16:49 
GeneralRe: Convert color from RGB to Color name Pin
W Balboos, GHB15-Oct-10 4:46
W Balboos, GHB15-Oct-10 4:46 
GeneralRe: Convert color from RGB to Color name Pin
W Balboos, GHB15-Oct-10 4:35
W Balboos, GHB15-Oct-10 4:35 
Keith Barrow wrote:
What about the longs that don't have named colors (which are the majority, there are > 16 million colours available)? Make one up? Find the closest (Now what do I do if it is exactly between to colors?)?



I'm not trying to be cynical, but, if you read my answer, I include:

A default value catches the rest (convert to a sting "#rrggbb", for example)

Personally, I don't take the 16+ million colors, and tiny subset which are actually given names, to be a reason "why it can't be done", but why it won't work well for the general case. It is a solution that will work "when it can". Another thought for consideration: although obviously of little-to-no-use for general color selection, such as an image, it would be quite useful for situations where the color set is usually limited, such as a web-page (yes, any RGB value can be specified, but typically, a fixed known value is selected viz-a-viz a custom color).

One might even consider the list of colors available in, for example, the .NET framework, as some indication that others think that a color listing is feasible. Yes, the directionality is changing, and thus, the mapping won't always work . . . but the resultant utility, or lack of it, is a decision for the original questioner to ponder.

The clear reasons (in your opinion) as to why it can't be done (as you put it) are only why it shouldn't be done.

Perhaps you were a bit harsh or overzealous in the criticism, or now, even more convinced of it. Still, I'll not vote you a one for the lambaste - you're entitled and all that.







"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"As far as we know, our computer has never had an undetected error." - Weisert
"If you are searching for perfection in others, then you seek dissappointment. If you are searching for perfection in yourself, then you seek failure." - Balboos HaGadol Mar 2010

GeneralRe: Convert color from RGB to Color name Pin
Keith Barrow16-Oct-10 3:40
professionalKeith Barrow16-Oct-10 3:40 
QuestionMEF never calls OnImportsSatisfied Pin
WebMaster13-Oct-10 23:49
WebMaster13-Oct-10 23:49 
AnswerRe: MEF never calls OnImportsSatisfied Pin
Not Active14-Oct-10 0:13
mentorNot Active14-Oct-10 0:13 
GeneralRe: MEF never calls OnImportsSatisfied Pin
WebMaster14-Oct-10 2:38
WebMaster14-Oct-10 2:38 
GeneralRe: MEF never calls OnImportsSatisfied Pin
Not Active14-Oct-10 3:16
mentorNot Active14-Oct-10 3:16 
QuestionI Used BulkCopy to transfer data One to another DB, moreover i like to know any other mathods... Pin
Manish_Kumar_Nayak13-Oct-10 23:43
Manish_Kumar_Nayak13-Oct-10 23:43 
AnswerRe: I Used BulkCopy to transfer data One to another DB, moreover i like to know any other mathods... Pin
PIEBALDconsult14-Oct-10 3:13
mvePIEBALDconsult14-Oct-10 3:13 
QuestionUnwanted relation: variable-object Pin
memk113-Oct-10 21:34
memk113-Oct-10 21:34 
AnswerRe: Unwanted relation: variable-object Pin
Sauro Viti13-Oct-10 21:46
professionalSauro Viti13-Oct-10 21:46 
GeneralRe: Unwanted relation: variable-object Pin
memk114-Oct-10 10:21
memk114-Oct-10 10:21 
QuestionMemory Leak using Flash.... Pin
jbradshaw13-Oct-10 8:59
jbradshaw13-Oct-10 8:59 
AnswerRe: Memory Leak using Flash.... Pin
Pete O'Hanlon13-Oct-10 9:46
mvePete O'Hanlon13-Oct-10 9:46 
GeneralRe: Memory Leak using Flash.... Pin
jbradshaw13-Oct-10 10:32
jbradshaw13-Oct-10 10:32 
GeneralRe: Memory Leak using Flash.... Pin
Pete O'Hanlon13-Oct-10 10:39
mvePete O'Hanlon13-Oct-10 10:39 
GeneralRe: Memory Leak using Flash.... Pin
jbradshaw13-Oct-10 10:45
jbradshaw13-Oct-10 10:45 
GeneralRe: Memory Leak using Flash.... Pin
Pete O'Hanlon13-Oct-10 11:32
mvePete O'Hanlon13-Oct-10 11:32 
QuestionRe: Memory Leak using Flash.... Pin
jbradshaw1-Dec-10 7:29
jbradshaw1-Dec-10 7:29 

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.