CSS rgb vs hex codes (v11)

Revision 11 of this benchmark created on


Preparation HTML

<div id="1"></div>
<div id="2"></div>
<div id="3"></div><script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
color names
$('#1').css('background-color','rgb(100,0,0)');
$('#2').css('background-color','rgb(0,100,0)');
$('#3').css('background-color','rgb(0,0,100)');
ready
hex codes
$('#1').css('background-color','#F00');
$('#2').css('background-color','#0F0');
$('#3').css('background-color','#00F');
ready
name
$('#1').css('background-color','red');
$('#2').css('background-color','blue');
$('#3').css('background-color','green');
ready
full hex
$('#1').css('background-color','#FF0000');
$('#2').css('background-color','#00FF00');
$('#3').css('background-color','#0000FF');
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.