Reputation: 845
I plan to be changing the color of a few hundred thousand divs a second and was wondering what the fastest way to do it was.
What are the best formats in terms of performance? rgb triples? hex codes? color words(black, chartreuse)?
Upvotes: -1
Views: 103
Reputation: 19112
I've run this jsPerf, and these are the general results:
In general, I think #RGB is the fastest format for every browser (on average).
Upvotes: 3
Reputation: 1
Hex codes would be the fastest. When you say for instance "black", it is read then changed to its hex code #000000
Upvotes: 0