FORUMS
Remove All Ads from XDA

Change Navigation bar colors without root or extra apps/themes

90 posts
Thanks Meter: 102
 
By haksancan, Member on 16th June 2017, 12:26 PM
Post Reply Email Thread
As you all know June update limits choices for the color of navigation bar. But underlying settings can be still set to arbitrary values using adb shell.

- No root access needed
- No extra applications needed
- No changing themes needed
- Change is persistent after reboot.

Relevant settings are under global/navigationbar_current_color and global/navigationbar_color.

For example by running this you'll get a dark shade:

Code:
adb shell settings put global navigationbar_color -317057255
adb shell settings put global navigationbar_current_color -317057255
adb shell settings put global navigationbar_use_theme_default 0
You can change the number value to get different colors. Default is "-986896"

Pay attention to minus sign if result of calculation is negative, it is significant.

Color picker

To pick colors easily and calculate their values automatically you can use the color picker

Example colors

• Opaque black: -16777216

• Transparent black: 65793 (this is not true black - rgb (0,0,0), but almost black - rgb (1,1,1)-)

• Transparent gray: 8421504

You can use the color picker linked above to calculate values for arbitrary colors of your choice.


Caveats

• Don't use transparent colors if you don't want navigation bar color to change with different apps (ex. keyboard)
• Some applications may set custom colors for navigation bar. This setting only changes default color of the bar, it doesn't override application specific colors.
• Fully transparent navigation bar is not possible except few builtin applications (eg. Gallery or app switcher). You can specify transparency but it just specifies how the nav. bar. color will render on top of the applications color, it doesn't mean the application will render under the navigation bar
• For some reason fully transparent true black shows up as opaque white in most applications. Workaround is using almost black colors instead of true black.

Details for manually calculating values:

Value format is ARGB hex color code converted to signed decimal. (Thanks Acoustichayes for pointing it out.)

1. Pick a color and find out its RGB hex code using a color picker (such as http://htmlcolorcodes.com/). For example you should get.
2. If you want transparency you must prepend transparency value to the color value. 00 is fully transparent, ff is fully opaque, inbetween are varying degrees of transparency.
3. Convert this value to decimal
4. If the resulting value is larger than 2147483647, subtract 4294967296 from it.

Example:
1. Hex value of desired color is #4826bf
2. We want 10% transparency, thus using e6 as the hex value for transparency. Prepend to color value and the number becomes e64826bf
3. Convert to decimal: 3863488191
4. 3863488191 is greater than 2147483647 (max signed int), thus our value wraps and become
Code:
3863488191 - 4294967296 = -431479105
5. Run
Code:
adb shell settings put global navigationbar_color -431479105
adb shell settings put global navigationbar_current_color -431479105
Attached Thumbnails
Click image for larger version

Name:	sc.png
Views:	29054
Size:	111.8 KB
ID:	4183620  
The Following 60 Users Say Thank You to haksancan For This Useful Post: [ View ] Gift haksancan Ad-Free
 
 
16th June 2017, 01:47 PM |#2  
Senior Member
Thanks Meter: 58
 
More
Does it stick after a reboot?

Sent from my SM-G955F using XDA-Developers Legacy app
16th June 2017, 04:37 PM |#3  
OP Member
Thanks Meter: 102
 
More
Quote:
Originally Posted by sunwee

Does it stick after a reboot?

Yes it does.
The Following 2 Users Say Thank You to haksancan For This Useful Post: [ View ] Gift haksancan Ad-Free
16th June 2017, 05:28 PM |#4  
MishaalRahman's Avatar
Editor in Chief
Thanks Meter: 1,816
 
More
Was going to post about this, but you beat me to it
The Following User Says Thank You to MishaalRahman For This Useful Post: [ View ] Gift MishaalRahman Ad-Free
16th June 2017, 06:34 PM |#5  
OP Member
Thanks Meter: 102
 
More
Quote:
Originally Posted by MishaalRahman

Was going to post about this, but you beat me to it

If you figure out the meaning of values please share with us
The Following User Says Thank You to haksancan For This Useful Post: [ View ] Gift haksancan Ad-Free
16th June 2017, 07:23 PM |#6  
Junior Member
Thanks Meter: 2
 
More
Hello, newbie here and I am not happy with the new update. If its okay, can you put a step by step on how to do this? I've never tried doing this kimd of things but I would if there's an instruction. Thanks!!
16th June 2017, 07:46 PM |#7  
Acoustichayes's Avatar
Senior Member
Flag Corn Fields
Thanks Meter: 812
 
Donate to Me
More
Are they not her values for color?
Generally, 6 digits is base color, eg: ffffff is white. Where each double digit is a representation of r, g, b.

And 8 digits adds alpha value(transparency) so the first 2 digits are the transparency and the last 6 are the color. You can Google hex color codes to look up exactly what you want
16th June 2017, 08:21 PM |#8  
Senior Member
Thanks Meter: 433
 
More
Any option like this to change the height of navbar?
Nice find btw
16th June 2017, 08:52 PM |#9  
amadeusz.odi's Avatar
Member
Thanks Meter: 23
 
More
Quote:
Originally Posted by CrazyCypher

Any option like this to change the height of navbar?
Nice find btw

.... check here in first post https://forum.xda-developers.com/sho....php?t=3604341
The Following 2 Users Say Thank You to amadeusz.odi For This Useful Post: [ View ] Gift amadeusz.odi Ad-Free
16th June 2017, 09:20 PM |#10  
OP Member
Thanks Meter: 102
 
More
Quote:
Originally Posted by Mikegasm

Hello, newbie here and I am not happy with the new update. If its okay, can you put a step by step on how to do this? I've never tried doing this kimd of things but I would if there's an instruction. Thanks!!

You have to install "adb" in your computer and connect the phone to pc with usb cable. You can search for adb guides on Google for detailed steps. It is a general android topic and not S8 specific so you can find plenty of guides.
16th June 2017, 09:23 PM |#11  
OP Member
Thanks Meter: 102
 
More
Quote:
Originally Posted by Acoustichayes

Are they not her values for color?
Generally, 6 digits is base color, eg: ffffff is white. Where each double digit is a representation of r, g, b.

And 8 digits adds alpha value(transparency) so the first 2 digits are the transparency and the last 6 are the color. You can Google hex color codes to look up exactly what you want

Wow thanks this must be it. I'll check it out.
The Following User Says Thank You to haksancan For This Useful Post: [ View ] Gift haksancan Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes