How do I get a color name from CMYK values?

Posted on 2006-05-08
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
    LVL 5

    Accepted Solution

    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

    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.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
    It’s quite interesting for me as I worked with Excel using 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 …
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now