skip to Main Content

What the difference between this color code #fff3f3f3 and #ffffff – the first one is 8 characters and second one is 6 ?

And how I can read that kind of colors #fff3f3f3 ?

5

Answers


  1. First is #ARGB, second is #RGB, where A – alpha channel (transparency)

    Login or Signup to reply.
  2. 8-character color code includes transparency as the last 2 digits.
    Put it in RGBA perspective:

    #ffffff is rgba(255,255,255,1.0)

    #fff3f3f3 is about rgba(255,243,243,0.95)

    Check https://css-tricks.com/8-digit-hex-codes/

    Login or Signup to reply.
  3. 8 characters would be HSLA or RGBA. Basically the extra two characters at the end would define transparency, whereas only 6 characters does NOT define transparency.

    More info on quackit.com

    Think of the 8 character color code as #RRGGBBAA where R is red, G is green, B is blue, and A is the alpha channel (transparency). As Daniel has in his answer, an alpha channel of f3 roughly evaluates to .95- very slightly transparent.

    Login or Signup to reply.
  4. the last 2 numbers are the Alpha Channel (transparency), something like in rgba(r,g,b,a)
    In your case, the last two is F3 what is equivalent to something about 96%.

      /* This is green: */
      background: rgb(0, 255, 0);
    
      /* That's the same as this: */
      background: #00ff00;
    
      /* We could make it 50% transparent like this: */
      background: rgba(0, 255, 0, 0.5);
    
      /* OR, with an alpha HEX, like this: */
      background: #00ff0080;
    

    Here’s a basic List of Alpha Channel for HEX:

      %     |  Hex

    ___________
    100% |  FF
    90%   |  E6
    80%   |  CC
    70%   |  B3
    60%   |  99

    50%   |  80
    40%   |  66
    30%   |  4D

    20%   |  33

    10%   |  1A

    0%     |  00

    Login or Signup to reply.
  5. In the 1st color code(#FFF3F3F3), the last two character represents alpha channel, which is the opacity of the color…The other one (#ffffff) which is having a length of 6 character is a solid color. It can either be written as #ffffff or #fff – this two represents the white color which can also be written in rgb or rgba format. The ‘r’represents red, ‘g’ represents green and ‘b’ represents blue in the rgb format. The rgb and rgba format are same but the later has an alpha value ‘a’ which is used as the opacity for the color. In the rgb and rgba, the color code for white will be rgb(255,255,255) and rgba(255,255,255,1) – 1 being the alpha value which says that the color is fully opaque. The alpha value of the color can be in the range of 0-1. Hope this helped.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search