Results 1 to 5 of 5

Thread: How to get RGB out of for ex. &H00C0FFFF&

  1. #1

    Thread Starter
    Hyperactive Member JMvVliet's Avatar
    Join Date
    May 2001
    Location
    Papendrecht, Netherlands
    Posts
    310

    How to get RGB out of for ex. &H00C0FFFF&

    How do I get the Red Green and Blue values out of a string like this:

    &H00C0FFFF&

    I know it is possible, but I can't find it. Can someone help me?

    Thnx in advance

  2. #2
    PowerPoster
    Join Date
    Aug 2001
    Location
    new jersey
    Posts
    2,904
    C0FFFF is the RGB portion. use mid to strip it out & then to separate the components (into C0, FF, and FF), if you wish.

  3. #3
    Fanatic Member
    Join Date
    Apr 2002
    Posts
    638
    there's lots of threads with code on these forums, just do a search.

  4. #4

  5. #5
    Addicted Member WALDO's Avatar
    Join Date
    Aug 2002
    Location
    Swing of Prussia, PA
    Posts
    244
    VB Code:
    1. lngColor = &H00C0FFFF&
    2.  
    3. Red = (lngColor And &HFF)
    4. Green = (lngColor And &HFFFF&) / &H100
    5. Blue = (lngColor And &HFFFFFF) / &H10000

Posting Permissions

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



Click Here to Expand Forum to Full Width