red-text
class's color rgb
value to be red.",
+ "Another way to represent color in CSS is with rgb
, or red-green-blue notation.",
+ "For each of the three colors, you specify a value between 0 and 256.",
+ "For example, black is rgb(0, 0, 0)
, white is rgb(255, 255, 255)
, bright green is rgb(0, 255, 0)
. You can also get less intense colors by using values lower than 255. For example, light green is rgb(0, 123, 0).",
+ "If you think about it, this is just as precise as using hex code
, because 16 times 16 is 256. In practice, most developers use hex code
since it's faster to say out loud and to type.",
+ "We'll use 6-digit hex code
in all our challenges going forward, but it's good to be aware of this rgb
notation."
+ ],
+ "tests": [
+ "expect($('h2')).to.have.css('color', 'rgb(255, 0, 0)');",
+ "expect($('h2')).to.have.class('red-text');"
+ ],
+ "challengeSeed": [
+ "",
+ "",
+ "hello world
",
+ "cat photo app
",
+ "lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
"
+ ],
+ "challengeType": 0
+ },
+
{
"_id" : "bad87fee1348bd9aedf08810",
"name": "Use Hex Codes for Precise Colors",
@@ -478,7 +468,7 @@
{
"_id" : "bad87fee1348bd9aedf08811",
- "name": "Use rgb Codes for Precise Colors",
+ "name": "Set the Alpha of a Color with rgba",
"difficulty" : "0.17",
"description": [
"Change the red-text
class's color rgb
value to be red.",
@@ -1293,7 +1283,7 @@
},
{
- "_id" : "bad87fee1348cd8acef08812",
+ "_id" : "bae87fee1348cd8acef08812",
"name": "Color a Bootstrap Button with Button Primary",
"difficulty" : "0.38",
"description": [
@@ -1302,7 +1292,8 @@
"Note that these buttons still need the btn
class."
],
"tests": [
- "expect($('.btn-block').length).to.eql(2);"
+ "expect($('.btn-block').length).to.eql(2);",
+ "expect($('.btn-primary').length).to.eql(2);"
],
"challengeSeed": [
"