[Last Call] Learn how to a build a cloud-first strategyRegister Now


How do I get a color name from CMYK values?

Posted on 2006-05-08
Medium Priority
Last Modified: 2006-11-18
I need to get a color name from CMYK values.  How can I do this in VB.Net?
Question by:stationeryhouse

Accepted Solution

tsay earned 150 total points
ID: 16630531
There's no such thing as a predefined class with cmyk color codes & names in .NET. You will have to create your own. For data storage you can use a file, database, resource file, or whatever you please. Let's say you have a file that has records like this:


Where 1 2 3 4 are the CMYK values. Then you'll have to look in the file if there is a record with those values, if there is, you can display the color name, if there isn't I would prompt the user to define the color name and then add it to the file so you'll have it for later.


Author Comment

ID: 16719221
I tried converting the CMYK value to RGB and then using the System.Drawing.ColorConverter to get the name.  This only worked marginally and from everything I read, it is not recommended to do such convertions because of the impreciseness.  Ultimately, I ended up following you route and using a table provide the names.


Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question