+ Reply to Thread
Results 1 to 2 of 2

Hex .Color codes swapping red and blue values

  1. #1
    Registered User
    Join Date
    08-12-2007
    Location
    United Sates
    MS-Off Ver
    Office 365, PC
    Posts
    29

    Hex .Color codes swapping red and blue values

    I'm changing the color of the selected cell to ahex value pasted from the clipboard:
    Please Login or Register  to view this content.
    The code works fine, except that it's inverting the red and blue values for some reason:
    Clipboard Becomes
    #FFD789 #89D7FF
    #FFCF42 #42CFFF
    #FFF744 #44F7FF
    #E8B10C #0CB1E8

    Any idea why this is happening and how I can fix it?

  2. #2
    Registered User
    Join Date
    08-12-2007
    Location
    United Sates
    MS-Off Ver
    Office 365, PC
    Posts
    29

    Re: Hex .Color codes swapping red and blue values

    I googled it a bit more and figured it out. Excel uses BGR color values instead of RGB for some ridiculous reason.

    Corrected code:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Conditional blue color when value is not a member of a set of numbers
    By RJ1969 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-20-2021, 11:35 PM
  2. Swapping cell content to INCLUDE CELL FORMATTING (Text color, background color, etc)
    By jcpeterson in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-10-2014, 10:09 AM
  3. Button (Form Control) should in Blue Color
    By waqarqrl in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-29-2013, 03:29 AM
  4. how to find a color in a row where the color is blue , if true fill with a specific text
    By jayakumar.chandran in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-01-2012, 03:38 AM
  5. Changing all blue color numbers/texts to black color in cells...
    By dhyun3 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-05-2012, 10:17 AM
  6. delete row if the font color is blue
    By barkiny in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2005, 07:40 AM
  7. how to change a color of cell 2a to blue if 2b contains a value?
    By Jon in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-04-2005, 11:25 AM

Tags for this Thread

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