Change color through script when object is selected

Hi, I’m trying to change the color of a cube using a Vector4 (r,g,b,a) and the “a” is not changing correctly. The color starts at (255,255,255,55) typed directly in the inspector. With “a” as 55 i can get a transperent effect.
Then, I use the method OnMouseDown() to detect a click on the cube. The code is:

private bool isSelected;
private Color initialColor;
private Color selectedColor;

void Start(){

isSelected = false;
initialColor = new Vector4(255,255,255,55);
selectedColor = new Vector4(2,255,2,55);


void OnMouseDown(){

isSelected = ! isSelected;

if (isSelected){
gameObject.GetComponet<Renderer>().Material.color = selectedColor;

else {  
               gameObject.GetComponet<Renderer>().Material.color = initialColor;


That is it. when I select the cube it should change to transparent green and when I click again it deselects and should change the color back to white transparent. However, the colors are changing to initialColor (255,255,255,255) and selectedColor(2,255,2,255).
The Alpha color is always changing to 255.
Does anyone knows what is happening? Or a better for changing the color and keep the trasparent effect?

EDIT: It looks like you want to use a Color32 instead of a Vector4

initialColor = new Color32(255,255,255,55)

Colors expect a value of 0-1 for their R,G,B and A values. Color32 allows you to use the 0-255 values in your example.