Mobile app version of vmapp.org
Login or Join
Moriarity648

: How to create a lighter/darker shade of a color for the hover state of a button I've been designing buttons for a while now but when it comes to selecting the color(s) for the hover state

@Moriarity648

Posted in: #Button #Color #HowTo #WebsiteDesign

I've been designing buttons for a while now but when it comes to selecting the color(s) for the hover state of either a gradient or solid its been mostly been a matter eyeballing a darker tone.

Is there a structured color theory out there that would help better judge what would be a more appropriate tone to use?

How dark should I go from the original?

How can I define lighter or darker shades of the "same" colour?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Moriarity648

2 Comments

Sorted by latest first Latest Oldest Best

 

@Harper654

Or, you could let some online generator do the colour choices for you, and just nick the code you need: CSS gradient Button is just one example.

10% popularity Vote Up Vote Down


 

@Kevin459

When looking for a slight change in lightness I usually do the math - simple counting really.

The hex format for colours is RRGGBB, meaning red, green and blue. Hexadecimal is counted from 0-F (so after 9 comes A).

If I have #191970 as my main button colour I'll add 1 or 2 to each colour value, resulting in a similar but lighter colour. Adding 1 to each would result in #1A1A71 .

The same could be done for finding a darker shade. Subtracting 1 from each colour value in #191970 would result in #18186F.

However, adding or subtracting 1 or 2 from each colour value is likely to result in an indistinguishable difference, so you'll probably need to add or subtract atleast 10 from each.

If you're using the number format (255, 255, 255), you can just add to each number using normal base 10 operations.

Adding the same amount to each colour value ensures that the hue and saturation remain consistent and the resulting colours blend harmoniously in a design.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme