This is an android studio plugin that allows you to creates new color in hex format based on a percentage (0-100) and a base color you specify i.e.
<color name="black">#000000</color>
when you supply 87 as the percentage, results in
<color name="black_87">#DE000000</color>
val textView = TextView(context)
textView.setTextColor(Color.parseColor("#000000"))
textView.setTextColor(0XFF000000)
when you supply 50 as the percentage, results in
val textView = TextView(context)
textView.setTextColor(Color.parseColor("#80000000"))
textView.setTextColor(0X80000000)
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="alpha-color"
android:textColor="#000000"/>
when you supply 10 as the percentage, results in
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="alpha-color"
android:textColor="#1A000000"/>
- Hop over to your "color code" and press alt + cmd (on windows Enter).
- Click on
Generate alpha variant
. - Key in the percentage and click OK
-
Manually:
Download the latest release and install it manually using Settings/Preferences > Plugins > ⚙️ > Install plugin from disk...
- Plugin based on the IntelliJ Platform Plugin Template.
- Plugin based on the alpha-bet.