Is There An Easy Way To See A Color In Android Studio?
Solution 1:
If you are looking into the R.java
file, all the resources including colors are registered there but this value 0x7f040027
is a resource id but NOT a color.
publicstaticfinalint cardview_light_background=0x7f040027;
You can see a preview inside the same colors.xml
file and you must define the colors preferently here:
if you want to see the preview go directly to the colors.xml
file.
As an example "#FFAABBCC"
- FF : alpha channel
- AA : Red Color.
- BB : Green Color.
- CC : Blue Color.
But wait, the color refered is a color from the SDK, to have a preview of this color you can write this line of code:
click in the blue description to get the preview in the left side from the SDK colors.xml
file:
In internet you can find several pages to have a preview of the color, you can define the color as ARGB or Hexadecimal format.
Solution 2:
In your example, 0x7f040027, 0x means it's hexadecimal, 7f is the alpha value, 04 is the Red, 00 is the Green and 27 is the Blue. Go on your favorite online color chooser website and type that in you should be good to go.
Post a Comment for "Is There An Easy Way To See A Color In Android Studio?"