+ Reply to Thread
Results 1 to 4 of 4

defining custom colors in surface plot legend

  1. #1
    Registered User
    Join Date
    07-25-2008
    Location
    Tucson, AZ
    Posts
    90

    defining custom colors in surface plot legend

    I have a surface plot (2-D contour type) with 8 entries in the legend. The default colors are in random order, but I want the range to be displayed in a logical ranking from hot to cold. So I plan to use a simple grayscale from white to black with shades of gray in between.

    In VBA I enter RGB values like this:

    Please Login or Register  to view this content.
    The problem is that Excel rounds these numbers to the nearset color in the 56 color palette. In other words all RGB from 140 to 150 are the same shade of gray, there is no graduation.

    How do I disable the rounding? Do I need to create custom colors in Excel? If so how do I do that? Do new colors replace the default 56? Are they present only in the current workbook?

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: defining custom colors in surface plot legend

    Select either of the charts, click the legend to change the scale, and (with the chart still selected), run ElevationShadeSurfaceChart
    Attached Files Attached Files
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    07-25-2008
    Location
    Tucson, AZ
    Posts
    90

    Re: defining custom colors in surface plot legend

    thanks shg

    the ActiveWorkbook.Colors command was what I was missing

    the only problem is if another chart in your spreadsheet uses a color that you delete by defining new greys..guess there is no way around that and why Excel 2007 allows 4 billion color definitions!

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: defining custom colors in surface plot legend

    It was more of an exercise that anything particularly useful, but yes, it would be much better in Excel 2007.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1