Results 1 to 4 of 4

Thread: What's the best way to do this?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Cleveland, Ohio
    Posts
    263

    Post

    Ok, so I have two colors, and I want to combine them by a certain percent ratio.

    Lets say I have a red and blue, and I want the color that's 75% red and 25% blue.

    I've got codes that appear to work at large ratios (like 50/50), but lets say when I try to combine 10% red and 90% white I get a blue shade.

    The code I've been using to do this, broken down to make it a little simpler (so it's easier to get the idea!):
    Code:
    R1 = 255 * 0.1
    G1 = 0 * 0.1
    B1 = 0 * 0.1
    R2 = 255 * 0.9
    G2 = 255 * 0.9
    B2 = 255 * 0.9
    BackColor = RGB(R1 + R2, G1 + G2, B1 + B2)
    And, once again, I get some shade of blue. Help? I'm not very good with colors!

  2. #2
    Guest

    Post

    Your code gave me a light pink.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Cleveland, Ohio
    Posts
    263

    Post

    Well, I'm a little confused... better look at my first code...

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 1999
    Location
    Cleveland, Ohio
    Posts
    263

    Post

    Yeah, um, well appearently the code works, it's just something before it was messing it up. Heh, well... thanks VirtuallyVB for helping me see the light!

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