Android color - how much darker is the primary color sign than primaryColor?

I am making an application that uses a special color hex for primaryColor . Because of this, I can't just go to Google and select the primaryColorDark to match that color.

My question is, how do you calculate the primaryColorDark based on my selected color or any primaryColor ?

My primaryColor I'm using is # 00A478.


source to share

3 answers

There are many color matching algorithms to calculate what you need. I found this site which has more information on the math behind them. The basic idea is to convert your color to the color space of a circle and find colors that geometrically match your color in that space.

There are also many tools on the Internet that implement these algorithms and can help you find colors.

I used this tool and Single Hue

algorithm to find the appropriate color for your primaryColor and found that # 007052 might suit you as the primaryColorDark .

Matching colors

Not bad, isn't it? :)



For Material Design, there is a MaterialPalette tool . You choose PrimaryColor and AccentColor , and the tool generates some nice looking colors based on your choice:

enter image description here



Google made the "Color Tool" which allows you to select a foreground color and it will generate your primaryColorDark and your accentColor It also shows you a preview of your color options in some very simple layouts.



All Articles