Art, asked by ankitgupta3245, 1 year ago

Expected color if contrast ratio is less than 2.17.1

Answers

Answered by Anonymous
3

 &lt;!DOCTYPE html&gt;</p><p>&lt;html&gt;</p><p>&lt;head&gt;</p><p>&lt;style&gt;</p><p>.button {</p><p>  background-color: #4CAF50;</p><p>  border: none;</p><p>  color: white;</p><p>  padding: 15px 32px;</p><p>  text-align: center;</p><p>  text-decoration: none;</p><p>  display: inline-block;</p><p>  font-size: 16px;</p><p>  margin: 4px 2px;</p><p>  cursor: pointer;</p><p>}</p><p>&lt;/style&gt;</p><p>&lt;/head&gt;</p><p>&lt;body&gt;</p><p></p><p>&lt;h2&gt;CSS Buttons&lt;/h2&gt;</p><p></p><p>&lt;button&gt;Default Button&lt;/button&gt;</p><p>&lt;a href="#" class="button"&gt;Link Button&lt;/a&gt;</p><p>&lt;button class="button"&gt;Button&lt;/button&gt;</p><p>&lt;input type="button" class="button" value="Input Button"&gt;</p><p></p><p>&lt;/body&gt;</p><p>&lt;/html&gt;

 &lt;!DOCTYPE html&gt;</p><p>&lt;html&gt;</p><p>&lt;head&gt;</p><p>&lt;style&gt;</p><p>.button {</p><p>  background-color: #4CAF50; /* Green */</p><p>  border: none;</p><p>  color: white;</p><p>  padding: 16px 32px;</p><p>  text-align: center;</p><p>  text-decoration: none;</p><p>  display: inline-block;</p><p>  font-size: 16px;</p><p>  margin: 4px 2px;</p><p>  -webkit-transition-duration: 0.4s; /* Safari */</p><p>  transition-duration: 0.4s;</p><p>  cursor: pointer;</p><p>}</p><p></p><p>.button1 {</p><p>  background-color: white;</p><p></p><p>  color: black; </p><p>  border: 2px solid #4CAF50;</p><p>}</p><p></p><p>.button1:hover {</p><p>  background-color: #4CAF50;</p><p>  color: white;</p><p>}</p><p></p><p>.button2 {</p><p>  background-color: white; </p><p></p><p>  color: black; </p><p>  border: 2px solid #008CBA;</p><p>}</p><p></p><p>.button2:hover {</p><p>  background-color: #008CBA;</p><p>  color: white;</p><p>}</p><p></p><p>.button3 {</p><p>  background-color: white; </p><p>  color: black; </p><p>  border: 2px solid #f44336;</p><p>}</p><p></p><p>.button3:hover {</p><p>  background-color: #f44336;</p><p>  color: white;</p><p>}</p><p></p><p>.button4 {</p><p></p><p> background-color: #f44336;</p><p>  color: white;</p><p>}</p><p></p><p>.button4 {</p><p>  background-color: white;</p><p>  color: black;</p><p>  border: 2px solid #e7e7e7;</p><p>}</p><p></p><p>.button4:hover {background-color: #e7e7e7;}</p><p></p><p>.button5 {</p><p>  background-color: white;</p><p>  color: black;</p><p>  border: 2px solid #555555;</p><p>}</p><p></p><p>.button5:hover {</p><p>  background-color: #555555;</p><p>  color: white;</p><p>}</p><p>&lt;/style&gt;</p><p>&lt;/head&gt;</p><p>&lt;body&gt;</p><p></p><p>&lt;button class="button button1"&gt;Green&lt;/button&gt;</p><p>&lt;button class="button button2"&gt;Blue&lt;/button&gt;</p><p>&lt;button class="button button3"&gt;Red&lt;/button&gt;</p><p>&lt;button class="button button4"&gt;Gray&lt;/button&gt;</p><p>&lt;button class="button button5"&gt;Black&lt;/button&gt;</p><p></p><p>&lt;/body&gt;</p><p>&lt;/html&gt;

 &lt;!DOCTYPE html&gt;</p><p>&lt;html&gt;</p><p>&lt;head&gt;</p><p>&lt;style&gt;</p><p>.button {</p><p>  background-color: #4CAF50; /* Green */</p><p>  border: none;</p><p>  color: white;</p><p>  padding: 16px 32px;</p><p>  text-align: center;</p><p>  text-decoration: none;</p><p>  display: inline-block;</p><p>  font-size: 16px;</p><p>  margin: 4px 2px;</p><p>  -webkit-transition-duration: 0.4s; /* Safari */</p><p>  transition-duration: 0.4s;</p><p>  cursor: pointer;</p><p>}</p><p></p><p></p><p></p><p>.button2 {</p><p>  background-color: white; </p><p></p><p>  color: black; </p><p>  border: 2px solid #008CBA;</p><p>}</p><p></p><p>.button2:hover {</p><p>  background-color: #008CBA;</p><p>  color: white;</p><p>}</p><p></p><p>.button3 {</p><p>  background-color: white; </p><p>  color: black; </p><p>  border: 2px solid #f44336;</p><p>}</p><p></p><p>.button3:hover {</p><p>  background-color: #f44336;</p><p>  color: white;</p><p>}</p><p></p><p>.button4 {</p><p></p><p> background-color: #f44336;</p><p>  color: white;</p><p>}</p><p></p><p>.button4 {</p><p>  background-color: white;</p><p>  color: black;</p><p>  border: 2px solid #e7e7e7;</p><p>}</p><p></p><p>.button4:hover {background-color: #e7e7e7;}</p><p></p><p>.button5 {</p><p>  background-color: white;</p><p>  color: black;</p><p>  border: 2px solid #555555;</p><p>}</p><p></p><p>.button5:hover {</p><p>  background-color: #555555;</p><p>  color: white;</p><p>}</p><p>&lt;/style&gt;</p><p>&lt;/head&gt;</p><p>&lt;body&gt;</p><p></p><p>&lt;button class="button button1"&gt;Green&lt;/button&gt;</p><p>&lt;button class="button button3"&gt;Red&lt;/button&gt;</p><p>&lt;/body&gt;</p><p>&lt;/html&gt;

Similar questions