Monday, August 15, 2016

Make color transparent (Hex values of Alpha color codes)

Here's a correct table of percentages to hex values. E.g. for 50% white you'd use #80FFFFFF

Using the below values one can achieve transparency in any color.

AARRGGBB where AA represents the alpha value and can be replaced with hex values from below table to achieve desired transparency.

  • 100% — FF
  • 95% — F2
  • 90% — E6
  • 85% — D9
  • 80% — CC
  • 75% — BF
  • 70% — B3
  • 65% — A6
  • 60% — 99
  • 55% — 8C
  • 50% — 80
  • 45% — 73
  • 40% — 66
  • 35% — 59
  • 30% — 4D
  • 25% — 40
  • 20% — 33
  • 15% — 26
  • 10% — 1A
  • 5% — 0D
  • 0% — 00

Taken from SO for my future reference 

Sunday, August 14, 2016

Screen resolutions

  • 36x36 (0.75x) for low-density
  • 48x48 (1.0x baseline) for medium-density
  • 72x72 (1.5x) for high-density
  • 96x96 (2.0x) for extra-high-density
  • 144x144 (3.0x) for extra-extra-high-density
  • 192x192 (4.0x) for extra-extra-extra-high-density (launcher icon only; see note above)


In short 

mdpi
ldpi = 0.75 X mdpi
hdpi = 1.5 X mdpi
xhdpi = 2 X mdpi
xxhdpi = 3 X mdpi
xxxhdpi = 4 X mdpi