Sunday 24 May 2015

Bitmap Graphics, Pixel, Resolution, Bit Colors, Hexa Decimal Color Representation in Photoshop

Photoshop is an Image Editing and Graphic Designing tool or software. Generally Computer graphics are of two types Vector Graphics and Bitmap Graphics. Photoshop uses the later one. In simple way bitmap graphics or images are those which lost its clarity or accuracy, when it enlarges. But in vector graphics, it don't lost its accuracy when it enlarges.

Bitmap Graphics
In bitmap graphics pictures are represented with the basic building block called "PIXEL"(short of Picture Element). We can see pixels when open an image in Photoshop and zoom in it.



Pixel
Pixels are the basic building blocks of Images. We know Images are the combination of colors. In a Black & White Image, each pixels color are varies between black and white. So the size of the image is much small. So the mode of this image can be called as "Grayscale". RGB mode is the commonly used color mode in Photoshop. In which each pixels in the image are formed with the combination of Red, Green and Blue colors. Other used color mode is CMYK(Cyan, Magenta, Yellow and Black) only for printing purpose.


Resolution
In case of Photoshop, resolution is the number of pixels in a unit length. It may be in centimeters or in inches. Sometimes Resolution is also to represent the total number of pixels in an image in its width and height (Resolution: width x height).




Color Bit Depth

In RGB color mode the commonly used bit depth of color is 8bits. That is to represent each color it uses 8bits. 8bit for Red, 8bit for Green and 8bit for Blue.

What is a bit?
A bit is either 1 or 0. In digital devices data is stored in the form of bits. 1 means presents of electric pulse and 0 means absents of it. 8bits means, eight storage spaces allocated for 1 or 0. Below given some examples of 8bit numbers;
00001000
10101010
10010010
111111111
...................
.....................
In Photoshop each colors has divided in 256 intensity divisions (ie: from 0 to 255). So, each pixels can have the color from 256x256x256 combinations. To represent a color Red-156, Green-78, Blue-234 to a pixel, it is converted into bits(Binary Digits). To represent the colors in 8bit the colors should be to represent bits. so that 0 can represent in 8bit as 00000000 and 255 is represented as 11111111.
The hexa decimal values are introduced to avoid confusions on binary digit. Two hexa decimal positions can represent 256 values (16x16=256). In hexa decimal smallest value is 0 and highest value is F(base 16 ie. 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F) to represent 256 in hexa decimal it is "FF".
Now RGB Colors Red-156, Green-78, Blue-234 can represent in Hexa decimal as #9C4EEA (156=9C, 78=4E, 234=EA)(# - hexa decimal prefix)

The safe colors on web can easily be found out using Hexa-Decimal Representation. For safe colors two digits of the same color has the same values, and those values are multiples of 3, ie. use 0,3,6,9,C and F to get safe colors. (Eg:FF6600, CC9966, etc.)

CCFF99 is a safe color on Web. Now it can represent in short as #CF9 on websites.