---
title: "How to change alpha color object?"  
description: "How to change alpha color object?"  
author: "Anonymous User"  
published: 2014-11-07  
updated: 2014-11-07  
canonical: https://www.mindstick.com/forum/2535/how-to-change-alpha-color-object  
category: "android"  
tags: ["java"]  
reading_time: 1 minute  

---

# How to change alpha color object?

Is there a way to [add](https://www.mindstick.com/forum/12983/add-address-in-textbox-when-page-is-load-and-if-i-search-address-in-textbox-show-in-map-by-javascript) aplha to [color](https://www.mindstick.com/articles/77/how-to-split-form-background-color-in-c-sharp) that i can get from a color string. Because [now](https://yourviews.mindstick.com/view/81402/it-s-liberals-vs-progressives-in-us-politics-now) i can draw my color without the alpha by using the following [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii)\

```
CircleOptions options = new CircleOptions().center(new LatLng(car.getLatitude(), car.getLongitude())).radius(car.getRadius()).strokeColor(Color.argb(50, 232, 245, 248)).strokeWidth(2).fillColor(Color.parseColor(car.getColorString()));
```

This [works fine](https://answers.mindstick.com/qa/115732/my-software-works-fine-on-windows-10-but-crashes-on-windows-11-why). But i want to make the color more transparent. Is there a good way to add alpha do this color because i can only get out a "ColorString"\

## Replies

### Reply by Anonymous User

Color is represented as a int and you can represent it with hex notation like 0xAARRGGBB, which means Alpha, Red, Green, Blue. So each value can be 0 to 255.\
Thus, what you want can be achieved with some bit operations.\
If you want reset alpha value then,\
int newColor = 0x10000000 | (Color.parseColor(car.getColorString()) & 0xFFFFFF);(0x10000000 means new alpha value - 16 which is about 6.274% alpha because 100% is 255)(0xFFFFFF means we take only rgb value from a color)


---

Original Source: https://www.mindstick.com/forum/2535/how-to-change-alpha-color-object

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
