Skip to content

Instantly share code, notes, and snippets.

@BriceShatzer
Last active January 25, 2017 19:38
Show Gist options
  • Save BriceShatzer/61e9f33848a0ae4242fd828584c48cda to your computer and use it in GitHub Desktop.
Save BriceShatzer/61e9f33848a0ae4242fd828584c48cda to your computer and use it in GitHub Desktop.
SO question that I might turn into an article

How is CSS transition of color calculated and what effect does using 3-digit vs 6-digit hex values have on that transition?

is there a difference between CSS transition of color when using 3-digit vs 6-digit hex values

Does Is there a difference in the resulting transition when you using 3-digit vs 6-digit hex values?

Since color is represented as a numerical value, originally I was thinking that it just increments/decrements from one value to the other.

But clearly that isn't the case, as transitioning from #000000 (black) to #FFFFFF would mean that 16777215 different values (all of the possible colors) would be shown...but obviously if you transition #000000 to #FFFFFF it doesn't.

since there are 000000 to ffffff has 16777213 descret values between

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment