Abstract-In this paper, we describe a novel spatial domain method for steganography in RGB images where a secret message is embedded in the blue layer of certain blocks. In this algorithm, each block first chooses a unique t 1 xt 2 matrix of pixels as a "matrix pattern" for each keyboard character, using the bit difference of neighbourhood pixels. Next, a secret message is embedded in the remaining part of the block, those without any role in the "matrix pattern" selection procedure. In this procedure, each pattern sums up with the blue layer of the image. For increasing the security, blocks are chosen randomly using a random generator. The results show that this algorithm is highly resistant against the frequency and spatial domain attacks including RS, Sample pair, X 2 and DCT based attacks. In addition, the proposed algorithm could provide more than 84.26 times of capacity comparing with a competitive method. Moreover, the results indicated that stego-image has almost 1.73 times better transparency than the competitive algorithm.