Calculating Color Range

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • simchajoy2000@yahoo.com

    #1

    Calculating Color Range

    Hi,

    I need to calculate a range of colors given the beginning and ending
    colors in hex values (i.e. blue to red). I know there is a logic to
    hex numbers and there is probably a fairly simple way to increment
    from one color to the next - but I have no idea what it is. Does
    anyone know how to do this? Any suggestions greatly appreciated!!

    Thanks!

    Joy

  • rowe_newsgroups

    #2
    Re: Calculating Color Range

    On May 10, 1:32 pm, "simchajoy2...@ yahoo.com"
    <simchajoy2...@ yahoo.comwrote:
    Hi,
    >
    I need to calculate a range of colors given the beginning and ending
    colors in hex values (i.e. blue to red). I know there is a logic to
    hex numbers and there is probably a fairly simple way to increment
    from one color to the next - but I have no idea what it is. Does
    anyone know how to do this? Any suggestions greatly appreciated!!
    >
    Thanks!
    >
    Joy
    Are you doing this for painting? If so you might look at the gradient
    brushes which do this automatically.

    As far as colors go, the following site might be a good read:



    Thanks,

    Seth Rowe

    Comment

    • simchajoy2000@yahoo.com

      #3
      Re: Calculating Color Range

      On May 10, 11:36 am, rowe_newsgroups <rowe_em...@yah oo.comwrote:
      On May 10, 1:32 pm, "simchajoy2...@ yahoo.com"
      >
      <simchajoy2...@ yahoo.comwrote:
      Hi,
      >
      I need to calculate a range of colors given the beginning and ending
      colors in hex values (i.e. blue to red). I know there is a logic to
      hex numbers and there is probably a fairly simple way to increment
      from one color to the next - but I have no idea what it is. Does
      anyone know how to do this? Any suggestions greatly appreciated!!
      >
      Thanks!
      >
      Joy
      >
      Are you doing this for painting? If so you might look at the gradient
      brushes which do this automatically.
      >
      As far as colors go, the following site might be a good read:
      >

      >
      Thanks,
      >
      Seth Rowe
      Actually, I just have a VB.NET form where a user can specify a color
      range and a range of values associated with it. They can also specify
      the increment, so for example: the color range is blue - red, the
      value range is 1 - 1,000 and the increment is 50. I will divide 1,000
      by 50 to get the number of individual ranges - for each range I need a
      color that falls within the range of blue - red. The only way I can
      figure out how to do this is to use the hex values and somehow
      increment them to get a color for each range. Does that make sense?

      Thanks for your help!

      Joy

      Comment

      • Andrew Morton

        #4
        Re: Calculating Color Range

        simchajoy2000@y ahoo.com wrote:
        I need to calculate a range of colors given the beginning and ending
        colors in hex values (i.e. blue to red). I know there is a logic to
        hex numbers and there is probably a fairly simple way to increment
        from one color to the next - but I have no idea what it is. Does
        anyone know how to do this? Any suggestions greatly appreciated!!
        You'll find it easier to get the range of colours in HSB colour space, where
        you simply vary the hue across the desired range, then convert back to RGB.



        Andrew


        Comment

        • simchajoy2000@yahoo.com

          #5
          Re: Calculating Color Range

          On May 11, 1:32 am, "Andrew Morton" <a...@in-press.co.uk.inv alid>
          wrote:
          simchajoy2...@y ahoo.com wrote:
          I need to calculate a range of colors given the beginning and ending
          colors in hex values (i.e. blue to red). I know there is a logic to
          hex numbers and there is probably a fairly simple way to increment
          from one color to the next - but I have no idea what it is. Does
          anyone know how to do this? Any suggestions greatly appreciated!!
          >
          You'll find it easier to get the range of colours in HSB colour space, where
          you simply vary the hue across the desired range, then convert back to RGB.
          >

          >
          Andrew
          Thank you! That's a great idea. Just for clarification though - HSB
          is the same as HSV correct? And do you know of any VB.NET example
          code that works with HSB?

          Joy

          Comment

          • Andrew Morton

            #6
            Re: Calculating Color Range

            simchajoy2000@y ahoo.com wrote:
            On May 11, 1:32 am, "Andrew Morton" <a...@in-press.co.uk.inv alid>
            wrote:
            >simchajoy2...@ yahoo.com wrote:
            >>I need to calculate a range of colors given the beginning and ending
            >>colors in hex values (i.e. blue to red). I know there is a logic to
            >>hex numbers and there is probably a fairly simple way to increment
            >>from one color to the next - but I have no idea what it is. Does
            >>anyone know how to do this? Any suggestions greatly appreciated!!
            >>
            >You'll find it easier to get the range of colours in HSB colour
            >space, where you simply vary the hue across the desired range, then
            >convert back to RGB.
            >>
            >http://en.wikipedia.org/wiki/HSV_color_space
            >>
            >Andrew
            >
            Thank you! That's a great idea. Just for clarification though - HSB
            is the same as HSV correct?
            Yes: HSB=hue, saturation, brightness; HSV=hue, saturation, value.
            And do you know of any VB.NET example
            code that works with HSB?
            Google for
            vb.net (hsv OR hsb)

            Andrew


            Comment

            Working...