What is this this color code " rgba 100,100,100,.5"?

Discussion in 'HTML & Website Design' started by TSG, Dec 29, 2012.

  1. #1
    Can you please tell me what is this "rgba 100,100,100,.5" color hexadecimal code? I like to use it for my blog post text color. If you know it please help me.

    Thanks!
     
    Solved! View solution.
    TSG, Dec 29, 2012 IP
  2. AlbCoder

    AlbCoder Well-Known Member

    Messages:
    126
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    163
    #2
    its #646464
     
    AlbCoder, Dec 29, 2012 IP
  3. AlbCoder

    AlbCoder Well-Known Member

    Messages:
    126
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    163
    #3
    You can use it so too :)
    For example
    h1 {
    color: rgba(100, 100, 100, 5);
    }
     
    AlbCoder, Dec 29, 2012 IP
  4. cybermichail

    cybermichail Greenhorn

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #4
    cybermichail, Dec 29, 2012 IP
  5. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #5
    Pay attention to the "A" part of RGBA -- it's not simply #646464, as it's also 50% transparent.

    The first three digits are red, green and blue in a range 0..255 (00 to FF hex)... that fourth number is transparency ranging from 0 to 1 as a floating point number. You set that fourth number to 0, it's 100% transparent. You set it to one, it will be #646464 -- at 0.5 it is blended 50% with whatever it's being drawn over.
     
    deathshadow, Dec 29, 2012 IP
  6. TSG

    TSG Member

    Messages:
    287
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #6
    Thanks you friends your replies. Yes looks like that's the color, but looks like its brightness lower than the font that I saw. How do i increase that color code brightness.

    I like to use this site post color, I think it also similar to this color, but it more thicker. http://www.macgasm.net/2012/12/29/apple-agrees-to-drop-patent-claims-against-samsungs-new-phone/

    Thanks!
     
    TSG, Dec 29, 2012 IP
  7. #7
    Oops, should say first three numbers, not digits when using rgba.

    rgba( red 0..255, green 0..255, blue 0..255, alpha 0..1)

    #333333 -- darker
    #888888 -- brighter
    #999999 -- even brighter
    #AAAAAA -- far brighter
    #FFFFFF -- white

    When red, green and blue are the same, you get greytones... so just make each pairing higher/lower. You can also state them as 3 digits long.

    #333 == #333333
    #888 == #888888
    #FFF == #FFFFFF

    You lose accuracy, but save a few bytes.

    Oh, and are you at least familiar with hexadecimal numbering? Each digit is a factor of 16, not ten... 0..9 still represent 0..9, but A..F represent 10..15. As such FF == 16*15+15 == 255.

    Or in the case of the original rgba(100,100,100,0.5) each of those 100's ends up being 64 hex.
    6*16+4 == 100
     
    Last edited: Dec 30, 2012
    deathshadow, Dec 30, 2012 IP
  8. TSG

    TSG Member

    Messages:
    287
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #8
    Thank you friend your detail answer. Yes it help very much.
     
    TSG, Jan 3, 2013 IP
  9. lolpasslol

    lolpasslol Peon

    Messages:
    860
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #9
    First time I have seen the color code like that ,
    I am confused for .5.
     
    lolpasslol, Jan 3, 2013 IP
  10. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #10
    Final number is alpha -- aka transparency. 1 would be 100% opaque, 0 would be 100% transparent, so 0.5 is half transparent/half opaque (depending on if you are a pessimist or an optimist)
     
    deathshadow, Jan 4, 2013 IP
  11. creativewebmaster

    creativewebmaster Active Member

    Messages:
    654
    Likes Received:
    7
    Best Answers:
    4
    Trophy Points:
    78
    #11
    #646464 you can use this one.
     
    creativewebmaster, Jan 5, 2013 IP