Results 1 to 4 of 4

Math Help - Colors

  1. #1
    Junior Member
    Joined
    May 2007
    Posts
    42

    Colors

    How to create Color shades.

    For example if red color means I have to reduce the intensity gradually and i have to create minimum 5 shade colors of red.

    Anyone help me How to do color shades, any algorithm is there?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by kumar View Post
    How to create Color shades.

    For example if red color means I have to reduce the intensity gradually and i have to create minimum 5 shade colors of red.

    Anyone help me How to do color shades, any algorithm is there?
    Not very clear, please clarify what you want to ask.

    You could start by saying how you are representing colour (probably 24 bit, 8 bits per channel for RGB, but if you do not say so we are only guessing).

    How about:

    \alpha [255,0,0] + (1-\alpha) [255,255,255]\ : \ \alpha \in [0,1]

    rounded to the nearest integers in [0,255]

    CB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member
    Joined
    May 2007
    Posts
    42
    Thanks for your reply.

    I dont know whether ie. 24bit or 8bit, Because I dont know more about colors.
    I didn't understand that formula. how to apply that formula. please explain.
    Red means 255, 0, 0 what I have to do with alpha value.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor

    Joined
    Apr 2005
    Posts
    15,697
    Thanks
    1468
    256= 2^8
    so 0 to 255 is 8 bits or one byte.

    In any case, 255/5= 51 so a loop such as i= 0 to 4, step 51 to get 0, 51, 102, 153, 204, 255 will work.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. [SOLVED] Car colors
    Posted in the Statistics Forum
    Replies: 6
    Last Post: January 27th 2011, 05:35 PM
  2. Colors
    Posted in the Advanced Applied Math Forum
    Replies: 6
    Last Post: April 13th 2009, 04:34 AM
  3. One Spinner 3 Colors
    Posted in the Statistics Forum
    Replies: 2
    Last Post: October 25th 2008, 09:22 PM
  4. colors
    Posted in the Algebra Forum
    Replies: 1
    Last Post: May 3rd 2007, 07:29 AM
  5. Do you know your colors?
    Posted in the Math Challenge Problems Forum
    Replies: 2
    Last Post: December 21st 2006, 08:45 AM

Search Tags


/mathhelpforum @mathhelpforum